コード例 #1
0
ファイル: UnitPlayer.cs プロジェクト: shibuzhuan/CovKnight
 //launch ability
 public void FireAbilityAlt()
 {
     if (destroyed || IsStunned())
     {
         return;
     }
     if (GameControl.EnableAltFire() && GameControl.EnableAbility())
     {
         AbilityManager.LaunchAbility();
     }
 }
コード例 #2
0
ファイル: Weapon.cs プロジェクト: shibuzhuan/CovKnight
        [HideInInspector] public Ability ability;       //the actual ability, only assigned in runtime

        //fire alternate mode
        public void FireAlt()
        {
            //if there's no ability, return
            if (ability == null || abilityID < 0)
            {
                return;
            }

            //check if the ability is ready to be activated
            string status = ability.IsReady();

            if (status != "")
            {
                //if cannot fire, fire event explaining why (for UI)
                TDS.FireAltFail(status);
                return;
            }

            //launch the ability
            AbilityManager.LaunchAbility(ability);
        }