| #ifdef GAME_TEMPLATE |
|
|
| enum InputTrigger |
| { |
| UP, |
| DOWN, |
| PRESSED, |
| VALUE |
| }; |
|
|
| class ActionManager |
| { |
| void ActionManager(ActionManager parent); |
| proto native external bool RegisterAction(string actionName); |
| proto native external bool RegisterContext(string contextName); |
| |
| proto native external float LocalValue(string actionName); |
| proto native external bool GetActionTriggered(string actionName); |
| |
| proto native external bool ActivateAction(string actionName, int duration = 0); |
| proto native external bool IsActionActive(string actionName); |
| |
| proto native external bool ActivateContext(string contextName, int duration = 0); |
| proto native external bool IsContextActive(string contextName); |
| |
| proto external void AddActionListener(string actionName, InputTrigger trigger, func callback); |
| |
| proto native external void SetContextDebug(string contextName, bool bDebug); |
| |
| proto native void SetParent(ActionManager parent); |
| proto native void SetDebug(bool bDebug); |
| }; |
|
|
| class InputManager: ActionManager |
| { |
| private void InputManager(ActionManager parent) {}; |
| private void ~InputManager() {}; |
| |
| proto native external void ResetAction(string actionName); |
| proto native void SetCursorPosition(int x, int y); |
| proto native external bool RegisterActionManager(ActionManager pManager); |
| proto native external bool UnregisterActionManager(ActionManager pManager); |
| }; |
|
|
| #endif |
|
|
|
|