haxe Behavior Tree