void Update() { if (_status != ABILITY_STATUS.IN_USE) { return; } //if player character w/ ult(Tank Ultimate Ability) if (_combatHandler is PlayerCombatHandler) { foreach (var a in _combatHandler.GetAbilities()) { if (a is AbilityUltimateTank) { AbilityUltimateTank aut = (AbilityUltimateTank)a; //can use ult if ult is 30 or above if (_combatHandler.GetUltimatePoint() > 29) { if (aut.GetStatus() != ABILITY_STATUS.IN_USE) { aut.SetStatus(ABILITY_STATUS.AVAILABLE); } } } } } }
/// <summary> /// Deactivate / Stop using this ability. /// </summary> public override void Deactivate() { //dev //if player character w/ ult(Tank Ultimate Ability) if (_combatHandler is PlayerCombatHandler) { foreach (var a in _combatHandler.GetAbilities()) { if (a is AbilityUltimateTank) { AbilityUltimateTank aut = (AbilityUltimateTank)a; // aut.Deactivate (); } } } base.Deactivate(); // _blockingPoint.GetCollider ().enabled = false; setEnableBlockingPoint(false); if (_combatHandler.GetComponent <PlayerCombatHandler> () != null) { _combatHandler.GetComponent <PlayerCombatHandler> ().SetCoopStatus(PLAYER_COOP_STATUS.DEFAULT); } }