Releases: realtradam/FelECS
Releases · realtradam/FelECS
Minor Addition
Rename
Major Overhaul
- Removed all ids as they were not used
- Scenes now have their own priority attribute
- Stages now sort and execute by Scenes, rather then the net Systems in the Scenes
- Component method
.attrs
was renamed to.to_h
- Renamed the
data
accessor to._data
- Various arrays are automatically compacted
- Classes and Modules which used a data array now have the entire set of array methods available to their respective Classes and Modules
- Convenience methods for accessing a single entity in a component(
@component.entity
) and accessing a single entity in a component(@entity.component[@component_manager]
) FelFlame::Order
class which can set the order of your Scenes and Systems
- Replaced all instances of
sort_by!
withsort_by
for compatibility with mruby - Minor optimizations such as less array duplication
Major Changes
Major Changes
- Entities and Components now reference each other using the objects themselves rather then their id's
# before:
@entity.components[@component_manager].each do |component_id|
# iterate over id's, usually would need to do a lookup to get the component itself
end
# after:
@entity.components[@component_manager].each do |component|
# iterate over the components themselves! No need for lookup anymore
end
# same for components referencing entities
# before:
@component.entities.each do |entity_id|
#iterate over id's
end
# after:
@component.entities.each do |entity|
# directly iterate over entities themselves!
end