/// <summary> /// 0.1秒执行一次计算路径和更新坐标 /// </summary> protected void UpdateHandler() { if (!isReady) { //Debug.Log("Not ready"); return; } UpdateMapPosition(); baseSprite.FaceToTarget(); if (isAttackCD) { AttackMessage message = new AttackMessage(this, this.targets, skillDict [CooldownType.Attack].Id); this.dispatchEvent(SoldierEvent.BATTLE_MESSAGE, message); isAttackCD = false; } if (isUltCD) { //boss自动放技能 if (this.baseSoldier.GetType() == typeof(AMSoldier)) { AttackMessage message = new AttackMessage(this, this.targets, skillDict [CooldownType.Ult].Id); this.dispatchEvent(SoldierEvent.BATTLE_MESSAGE, message); isUltCD = false; } } CheckGuardRange(); //Debug.Log (mapPos); }