예제 #1
0
        public static StateSyncMessage Create(RoomState roomState)
        {
            var obj = HoloNetAppModule.instance.objectPool.Pop <StateSyncMessage>();

            obj.roomState = roomState;
            return(obj);
        }
예제 #2
0
        private RoomState PackAllStates()
        {
            var result  = new RoomState();
            var objects = HoloNetAppModule.instance.objectsManager.GetAll();

            result.objectStates = new List <HoloNetObjectState>();
            foreach (var item in objects)
            {
                result.objectStates.Add(item.GetState());
            }

            result.creationTime = HoloNetAppModule.instance.provider.GetServerTime();
            return(result);
        }
예제 #3
0
 private void OnStateReceived(StateSyncMessage message)
 {
     Debug.Log("[HOLONET] - Received Object State Snapshot.");
     roomStateToApply = message.roomState;
 }
예제 #4
0
 public void ClearRoomState()
 {
     roomStateToApply = null;
 }