Beispiel #1
0
        /// <summary>
        /// Handles key down event.
        /// </summary>
        public void HandleKeyDown(uint keyData)
        {
            Debug.Assert(_IsDisposed == false);

            ActionProc action = GetKeyBind(keyData);

            if (action != null)
            {
                action(_UI);
            }
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
        void _change()
        {
            currentAction.last();


            currentAction = nextAction;

            nextAction.shiftToIdle();

            actionProc = _idle;

            physicsProc = _idle;


            currentAction.first();


            actionProc();
        }
Beispiel #4
0
        public void init(ActionInitProc currentInit)
        {
            currentAction = new ActionHolder();

            nextAction = new ActionHolder();


            currentAction.shiftToIdle();

            nextAction.shiftToIdle();

            actionProc = _idle;

            physicsProc = _idle;


            currentInit(ref currentAction);


            currentAction.first();
        }
Beispiel #5
0
 public void shiftTo(ActionProc act)
 {
     actionProc = act;
 }
Beispiel #6
0
            public void shiftToIdle()
            {
                first = _idle;

                last = _idle;
            }