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(); } }
public void ConditionCheck() { if (AIB == null) { return; } if (AIB.hostile) { bool notarget = AIB.NoTarget(); if (notarget) { //Patrol around angrily with short breaks if no Target if (!goforward) { MoveRandom(btinterv / 2); } else { MoveForward(); } return; } else { MoveTarget(); } //If Target is around, go towards him. } else { //Stay in place unless patro if (patrol) { MoveRandom(btinterv); } } }