Ejemplo n.º 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);
            }
Ejemplo n.º 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);
         }
     }
 }