nadako / Ash-Haxe

Port of Ash entity framework to Haxe
Other
131 stars 37 forks source link

Add ability to set priority when adding Systems to EngineState #26

Closed IkonOne closed 8 years ago

IkonOne commented 9 years ago

Commit https://github.com/IkonicGames/Ash-Haxe/commit/72fbcdd2d9fb93863b9eb1a3181d2f8fbde86e6d is a solution to issue #25

I provided default values for the priority variables in the function parameters to maintain backwards compatibility.

Commit https://github.com/IkonicGames/Ash-Haxe/commit/8f73662fd9d079b6965bb6a923a8b5c21fda4780 is a solution to issue #24

After looking at the code, changing to the foreach was not going to work to fix the issue for every case. A fringe example would be 2 EngineStates share the same System that depends on another System that is switched out with each state. Simply changing the For loop would not address this use case. Adding signals to the Engine addresses every case I could think of and is a useful feature as well. Imho at least.