Пример #1
0
    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);
                        }
                    }
                }
            }
        }
    }
Пример #2
0
    /// <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);
        }
    }