예제 #1
0
파일: AgentRemote.cs 프로젝트: dqtoy/Assets
 private void SyncPosition()
 {
     if (UnitInfo.AgentStatus == AgentStatus.Move)
     {
         string     json     = JsonUtility.ToJson(UnitInfo);
         JSONObject moveData = new JSONObject(json);
         FixedMove.StartMove(moveData);
     }
     else
     {
         FixedMove.Stop();
     }
 }
예제 #2
0
파일: AgentRemote.cs 프로젝트: dqtoy/Assets
        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);
        }