override public void onRemoveManager() { if (_gameManager != null) { if (_gameManager.hasEventListener(GameManager.SCORE_CHANGED, _onScoreChanged)) { _gameManager.removeEventListener(GameManager.SCORE_CHANGED, _onScoreChanged); } _gameManager = null; } }
// 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); } } }