Haxe Hierarchical State Machine