Example #1
0
        public override void onExit()
        {
            CCEventDispatcher eventDispatcher = CCDirectorMac.sharedDirector.eventDispatcher;

            if (_mouseEnabled)
            {
                eventDispatcher.removeMouseDelegate(this);
            }

            if (_keyboardEnabled)
            {
                eventDispatcher.removeKeyboardDelegate(this);
            }
            base.onExit();
        }
Example #2
0
        public override void onEnter()
        {
            base.onEnter();
            CCEventDispatcher eventDispatcher = CCDirectorMac.sharedDirector.eventDispatcher;

            if (_mouseEnabled)
            {
                eventDispatcher.addMouseDelegate(this, _mousePriority);
            }

            if (_keyboardEnabled)
            {
                eventDispatcher.addKeyboardDelegate(this, _keyboardPriority);
            }
        }
 public CCDirectorMac()
 {
     _eventDispatcher = new CCEventDispatcher();
 }