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(); } }
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; } }
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); }
void CheckAmmo() { //int percent = Mathf.FloorToInt(((float)G.GetAmmo()/(float)G.clip)*100f); EX.ExtendPercent(G.GetAmmoPercent()); }