Exemplo n.º 1
0
    // when rage full, will do call back
    public void FireRage()
    {
        foreach (AIAgent.STATE ass in _statesCanFireRageAtOnce)
        {
            if (_owner.AIStateAgent.CurrentStateID == ass &&
                (_owner.AIStateAgent.NextStateID != AIAgent.STATE.HURT &&
                 _owner.AIStateAgent.NextStateID != AIAgent.STATE.DEAD) &&
                _owner.TargetAC != null &&
                _owner.TargetAC.IsAlived)

            {
                int skillID = _owner.AttackCountAgent.GetRageSkillID(_owner.TargetAC.ThisTransform.localPosition, _skillsForRage);
                if (skillID == -1 && _skillsForRage.Count > 0)
                {
                    skillID = 0;
                }
                Debug.Log(_skillsForRage[skillID]._skillName);
                _owner.GoToAttack(_skillsForRage[skillID]._skillName, true);
                ClearRage();
            }
        }
    }