示例#1
0
 public void ConditionCheck()
 {
     if (AIB != null && AIB.hostile)
     {
         bool target = AIB.NoTarget();
         if (!target)
         {
             float d = Mathf.Abs(AIB.CalculateTarget());
             if (d < extendDist)
             {
                 if (jumpex && d < 4)
                 {
                     EX.ExtendPercent(100);
                 }
                 else
                 {
                     EX.ExtendPercent(attackex);
                 }
             }
             else
             {
                 EX.ExtendPercent(0);
             }
         }
     }
     //else if (AIB != null) { ExtendRandom(); }
 }
示例#2
0
 private void DisableAttacks(bool enable = false)
 {
     if (EX != null)
     {
         EX.ExtendPercent(0);
     }
     if (Dzones == null)
     {
         return;
     }
     //Debug.Log("disabling " + (cattack - 2));
     for (int i = 0; i < Dzones.Count; i++)
     {
         Dzones[i].enabled = enable;
     }
     //if ( active) { Dzones[0].enabled = true; return; }
 }
示例#3
0
 private void Target_HpChanged(Character.Health who)
 {
     EX.ExtendPercent(Target.GetPercentHP());
     //int hp = Target.HP;
     //if (hp > 3) { hp = 3; } //Simple, who need more ??
     //if (hp < 1) { hp = 1; }
     //LS.PlayAnimation(4-hp,true,true);
 }
示例#4
0
 void CheckAmmo()
 {
     //int percent = Mathf.FloorToInt(((float)G.GetAmmo()/(float)G.clip)*100f);
     EX.ExtendPercent(G.GetAmmoPercent());
 }