private void SyncPosition() { if (UnitInfo.AgentStatus == AgentStatus.Move) { string json = JsonUtility.ToJson(UnitInfo); JSONObject moveData = new JSONObject(json); FixedMove.StartMove(moveData); } else { FixedMove.Stop(); } }
public void Dead() { Debugger.Log(AgentID + ": dead called from animation"); unitSubject.Remove(observer); deathEvents?.Invoke(this); deathEvents = null; FixedMove.Stop(); NavAgent?.Stop(); Unbinding(); unitSubject.Remove(observer); unitSubject.ObserverPooling.Release(observer); }