View Source Upgrade Guide
0.4 to 0.5
Non-unique Component types are no longer allowed. Setting the :unique option from within a Component
module now has no effect. If you are currently using non-unique Component types in your application,
you must replace them with Entities as described in the one_to_many guide.
Component read/write changes:
MyComponent.get_one/1should be renamed toMyComponent.get/1
0.3.x to 0.4
In manager.ex:
setup doshould be changed todef startup do- Remove the
:tick_rateoption if it is set - If the
:tick_rateoption was not the default of 20, addconfig :ecsx, tick_rate: nto yourconfig.exs, where n is your chosen tick rate
In application.ex:
- If the list of children in
start/2containsECSx.ClientEventsorYourApp.Manager, remove them
Component read/write changes:
- Any use of
MyComponent.get_one(entity)wherenilwas a possibility, should be replaced withMyComponent.get_one(entity, nil) - Any use of
MyComponent.add(entity, value)to update the value of a unique component, should be replaced withMyComponent.update(entity, value). If theadd/2call was used in a way where sometimes it would create new components, and other times update those components, you will need to separate the two cases to useadd/2only for the initial creation, and thenupdate/2for all subsequent updates.