Пример #1
0
    public override void Init()
    {
        CurrentAttackSpeed = Ori_AttackSpeed;
        CurrentDamage      = Ori_Damage;
        if (Ani == null)
        {
            Ani = GetComponent <Animation>();
        }

        if (StateMachine == null)
        {
            StateMachine = new Hero_StateMachine <Hero_Behavior>();
            StateMachine.Init(this, new Hero_Live());
        }

        int index = 0;

        foreach (HeroSkillFoundation _Skill in SkillList)
        {
            if (index < ActivateSkillNumber)
            {
                _Skill.IsActivate = true;
                _Skill.ApplySkill(this);
            }
            else
            {
                _Skill.IsActivate = false;
                _Skill.IsApply    = false;
            }
            index++;
        }
    }
Пример #2
0
    public override void Init()
    {
        CurrentAttackSpeed = Ori_AttackSpeed;
        CurrentDamage = Ori_Damage;
        if (Ani == null)
        {
            Ani = GetComponent<Animation>();
        }

        if (StateMachine == null)
        {
            StateMachine = new Hero_StateMachine<Hero_Behavior>();
            StateMachine.Init(this, new Hero_Live());
        }

        int index = 0;
        foreach (HeroSkillFoundation _Skill in SkillList)
        {
            if (index < ActivateSkillNumber)
            {
                _Skill.IsActivate = true;
                _Skill.ApplySkill(this);
            }
            else
            {
                _Skill.IsActivate = false;
                _Skill.IsApply = false;
            }
            index++;
        }
    }