예제 #1
0
            public IGameEntity CreateFromNetwork(string entityId, Character character, TrackData trackData)
            {
                Vector3        spawnPosition = GmUtil.TrackdataToVector3(trackData);
                GameEntityType entityType    = GameEntity.GameEntityTypeFromTrackData(trackData);
                Vector3        spawnPoint    = SpawnPoint.Instance().GetNpcSpawnpoint(spawnPosition);
                IGameEntity    gameEntity    = Create(entityId, character, entityType, spawnPoint, ControllerType.Remote);

                return(gameEntity);
            }
예제 #2
0
 public void UpdateFromNetwork(TrackData trackData, bool hasDelta)
 {
     this.trackData = trackData;
     if (trackData.broadcast != 1)
     {
         if (hasDelta)
         {
             position = GmUtil.TrackdataDeltaToVector3(trackData, position);
         }
         else
         {
             position = GmUtil.TrackdataToVector3(trackData);
         }
     }
 }