예제 #1
0
 override public void onRemoveManager()
 {
     if (_gameManager != null)
     {
         if (_gameManager.hasEventListener(GameManager.SCORE_CHANGED, _onScoreChanged))
         {
             _gameManager.removeEventListener(GameManager.SCORE_CHANGED, _onScoreChanged);
         }
         _gameManager = null;
     }
 }
예제 #2
0
        // PUBLIC

        // PUBLIC STATIC

        // PRIVATE

        // PRIVATE STATIC


        // PRIVATE COROUTINE

        // PRIVATE INVOKE

        //--------------------------------------
        //  Events
        //--------------------------------------

        override public void onReset(BaseManager aBaseManager)
        {
            //JUST RE-GET THIS OFTEN
            _gameManager = UMOM.Instance.getManager <GameManager>();

            //
            if (_gameManager != null)
            {
                if (!_gameManager.hasEventListener(GameManager.SCORE_CHANGED, _onScoreChanged))
                {
                    _gameManager.addEventListener(GameManager.SCORE_CHANGED, _onScoreChanged);
                }
                else
                {
                    _gameManager.removeEventListener(GameManager.SCORE_CHANGED, _onScoreChanged);
                }
            }
        }
        // PUBLIC
        // PUBLIC STATIC
        // PRIVATE
        // PRIVATE STATIC
        // PRIVATE COROUTINE
        // PRIVATE INVOKE
        //--------------------------------------
        //  Events
        //--------------------------------------
        public override void onReset(BaseManager aBaseManager)
        {
            //JUST RE-GET THIS OFTEN
            _gameManager = UMOM.Instance.getManager<GameManager>();

            //
            if (_gameManager != null) {

                if (!_gameManager.hasEventListener (GameManager.SCORE_CHANGED, _onScoreChanged) ) {
                    _gameManager.addEventListener (GameManager.SCORE_CHANGED, _onScoreChanged);
                } else {
                    _gameManager.removeEventListener (GameManager.SCORE_CHANGED, _onScoreChanged);
                }
            }
        }