nadako / Ash-Haxe

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

EngineStates do not allow you to specify System Priority. #25

Closed IkonOne closed 8 years ago

IkonOne commented 9 years ago

The system 'add' functions in EngineState do not allow the System priority to be specified.

https://github.com/nadako/Ash-Haxe/blob/master/src/ash/fsm/EngineStateMachine.hx

T1mL3arn commented 8 years ago

When you do state.addInstance() you get link to StateSystemMapping object, it has withPriority() method to specify priority for the system.

So you can do

state.addInstance(new PhysicSystem()).withPriority(1)
     .addInstance(new CameraSystem()).withPriority(2)
     .addInstance(new PreUpdateSystem()).withPriority(0);
IkonOne commented 8 years ago

Ah yes. Thank you. I'll just close this and walk away like nothing happened...

T1mL3arn commented 8 years ago

Don't forget to close other related issues!