River Jiang
2020-10-27 24f59b89e9eabcfe948fc0ba304a8dbec2deda14
Assets/Scripts/TowerDefense/Agents/Agent.cs
@@ -193,6 +193,12 @@
        protected bool bInDeathAct = false;
        /// <summary>
        /// 原地罚站
        /// </summary>
        /// <param name="can"></param>
        public bool CanMove { get; set; } = true;
        /// <summary>
        /// Gets the attached nav mesh agent velocity
        /// </summary>
        public override Vector3 velocity
@@ -848,7 +854,7 @@
            this.UpdateAction();
            // 处理死亡状态了,不必再移动:
            if (bInDeathAct) return;
            if (bInDeathAct || !CanMove) return;
            m_Destination = initNode.GetNextNode();
            updateAgentPos(Time.deltaTime);