/// <summary> /// Handles key down event. /// </summary> public void HandleKeyDown(uint keyData) { Debug.Assert(_IsDisposed == false); ActionProc action = GetKeyBind(keyData); if (action != null) { action(_UI); } }
public void SetKeyBind(uint keyCode, ActionProc action) { Debug.Assert(_IsDisposed == false); // remove specified key code from dictionary anyway _KeyMap.Remove(keyCode); // if it's not null, regist the action if (action != null) { _KeyMap.Add(keyCode, action); } }
void _change() { currentAction.last(); currentAction = nextAction; nextAction.shiftToIdle(); actionProc = _idle; physicsProc = _idle; currentAction.first(); actionProc(); }
public void init(ActionInitProc currentInit) { currentAction = new ActionHolder(); nextAction = new ActionHolder(); currentAction.shiftToIdle(); nextAction.shiftToIdle(); actionProc = _idle; physicsProc = _idle; currentInit(ref currentAction); currentAction.first(); }
public void shiftTo(ActionProc act) { actionProc = act; }
public void shiftToIdle() { first = _idle; last = _idle; }