nadako / Ash-Haxe

Port of Ash entity framework to Haxe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EngineStates do not allow you to specify System Priority.

IkonOne opened this issue · comments

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

commented

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);

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

commented

Don't forget to close other related issues!