protected virtual void OnUpdate(float dt) { JSONArray onUpdate = data["on_update"]?.AsArray; if (onUpdate != null) { InterpreterBridge.RunCommands(onUpdate, context); } }
protected virtual void OnExecute(UnitEntity owner, UnitEntity[] targets) { JSONArray onExecute = data["on_execute"]?.AsArray; context = new Dictionary <string, object>(); context["entity"] = owner; owner.variables["targets"] = targets; if (onExecute != null) { InterpreterBridge.RunCommands(onExecute, context); } }