public void Enable() { if (_enabled) { return; } //add 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; _HandUI._Enabled = true; //enable components if (_CommanderUI) { _CommanderUI._Paused = false; } _CameraMovement.EnableCameraMovement(); _ArmyUI.Enable(); _enabled = true; }
public void Enable() { if (_enabled) { return; } //add event listeners _CardDisplayUI.OnCardUse += _CardDisplayUI_OnCardUse; //enable components _ArmyUI.Enable(); _HandUI._Enabled = true; _ButtonsUI._Enabled = true; _enabled = true; BattleManager.OnBattleAbleUpdate += BattleManager_OnBattleAbleUpdate; BattleManager.OnBattleAbleTakeDamage += BattleManager_OnBattleAbleTakeDamage; }