public bool validCast(KBEngine.Entity caster, SCObject target) { float dist = Vector3.Distance(target.getPosition(), caster.position); Debug.Log("skill dis:" + target.getPosition() + " - " + caster.position + " - " + dist + " - " + canUseDistMax); if (dist > canUseDistMax) { return(false); } return(true); }
public bool validCast(KBEngine.Entity caster, SCObject target) { float dist = Vector3.Distance(target.getPosition(), caster.position); if(dist > canUseDistMax) return false; return true; }
public bool validCast(KBEngine.Entity caster, SCObject target) { float dist = Vector3.Distance(target.getPosition(), caster.position); if (dist > canUseDistMax) { return(false); } return(true); }
public bool validCast(KBEngine.Entity caster, SCObject target) { TimeSpan span = DateTime.Now - lastUsedTime; if (span.TotalMilliseconds < 300) { return(false); } float dist = Vector3.Distance(target.getPosition(), caster.position); if (dist > canUseDistMax) { return(false); } return(true); }
//1: 太远, 2:冷却,3:已死亡 public int validCast(KBEngine.Entity caster, SCObject target) { float dist = Vector3.Distance(target.getPosition(), caster.position); if (dist > canUseDistMax) { return(1); } if (restCoolTimer < coolTime) { return(2); } if (((SByte)(caster.getDefinedProperty("state"))) == 1) { return(3); } return(0); }
//1: 太远, 2:冷却,3:已死亡 public int validCast(KBEngine.Entity caster, SCObject target) { float dist = Vector3.Distance(target.getPosition(), caster.position); if (dist > canUseDistMax) return 1; if (restCoolTimer < coolTime) return 2; if (((SByte)(caster.getDefinedProperty("state"))) == 1) return 3; return 0; }