Skill.Start C# (CSharp) Méthode

Start() protected méthode

protected Start ( ) : void
Résultat void
    protected virtual void Start()
    {
        mana = GetComponent<Mana>();
    }

Usage Example

 public void ComboAttack(int index, Units target)
 {
     if (this.self.CanAttack && !this.isComboAttack)
     {
         this.isComboAttack = true;
         Skill attackByIndex = this.self.getAttackByIndex(index);
         if (attackByIndex != null)
         {
             if (target == null)
             {
                 target = this.self.GetAttackTarget();
             }
             attackByIndex.attackTarget = target;
             if (attackByIndex.CheckCondition() && attackByIndex.CheckTargets() && !base.IsCurAttackRunnning())
             {
                 attackByIndex.Start();
                 attackByIndex.OnSkillStartCallback = new Callback <Skill>(base.OnAttackStart);
                 attackByIndex.OnSkillEndCallback   = new Callback <Skill>(base.OnAttackEnd);
                 base.CurAttack = attackByIndex;
                 this.UpdateCurAttackIndex();
             }
         }
         this.isComboAttack = false;
     }
 }
All Usage Examples Of Skill::Start