Пример #1
0
    public void Disable()
    {
        if (!_enabled)
        {
            return;
        }
        //remove event listeners
        _battlebeardCommanderUI.OnCommanderMoved      -= _CommanderUI_OnCommanderMoved;
        _battlebeardCommanderUI.OnCommanderForceMoved -= _CommanderUI_OnCommanderForceMoved;
        _battlebeardCommanderUI.OnStartDrag           -= _CommanderUI_OnStartDrag;
        _battlebeardCommanderUI.OnCommanderDrop       -= _CommanderUI_OnCommanderDrop;
        _battlebeardCommanderUI.OnCommanderGrounded   -= _CommanderUI_Grounded;
        _battlebeardCommanderUI.OnDropCommander       -= _CommanderUI_OnDropCommander;

        _stormshaperCommanderUI.OnCommanderMoved      -= _CommanderUI_OnCommanderMoved;
        _stormshaperCommanderUI.OnCommanderForceMoved -= _CommanderUI_OnCommanderForceMoved;
        _stormshaperCommanderUI.OnStartDrag           -= _CommanderUI_OnStartDrag;
        _stormshaperCommanderUI.OnCommanderDrop       -= _CommanderUI_OnCommanderDrop;
        _stormshaperCommanderUI.OnCommanderGrounded   -= _CommanderUI_Grounded;
        _stormshaperCommanderUI.OnDropCommander       -= _CommanderUI_OnDropCommander;
        _CardDisplayUI.OnCardUse -= _CardDisplayUI_OnCardUse;
        _CardDisplayUI.Hide();
        _HandUI._Enabled = false;

        //disable components
        if (_CommanderUI)
        {
            _CommanderUI._Paused = true;
        }

        _BoardUI.PlayerPrompt_DefaultTiles();
        _CameraMovement.DisableCameraMovement();
        _ArmyUI.Disable();
        _enabled = false;
    }
Пример #2
0
    public void Disable()
    {
        if (!_enabled)
        {
            return;
        }
        //remove event listeners
        _CardDisplayUI.OnCardUse -= _CardDisplayUI_OnCardUse;
        _CardDisplayUI.Hide();

        //disable components
        _ArmyUI.Disable();
        _HandUI._Enabled    = false;
        _ButtonsUI._Enabled = false;
        _enabled            = false;
        BattleManager.OnBattleAbleUpdate     -= BattleManager_OnBattleAbleUpdate;
        BattleManager.OnBattleAbleTakeDamage -= BattleManager_OnBattleAbleTakeDamage;
    }