Esempio n. 1
0
 public void Load(EndianStream stream, MapMetaData mapMetaData)
 {
     Offset = stream.Position;
     Ident = stream.ReadInt32();
     Tag = mapMetaData.GetTag(Ident);
     RunTimeMinimium = stream.ReadByte();
     RunTimeMaximium = stream.ReadByte();
     CountOnMap = stream.ReadByte();
     DesignTimeMaximium = stream.ReadByte();
     Cost = stream.ReadFloat();
 }
Esempio n. 2
0
            public void Load(EndianStream stream)
            {
                Offset = stream.Position;
                stream.SeekTo(stream.Position + 0x0C);
                TagIndex = stream.ReadInt32();
                SpawnCoordinates = new Coordinates
                                        {
                                            X = stream.ReadFloat(),
                                            Y = stream.ReadFloat(),
                                            Z = stream.ReadFloat()
                                        };
                SpawnPosition = new Position
                                    {
                                        Right = new Vector3
                                                    {
                                                        X = stream.ReadFloat(),
                                                        Y = stream.ReadFloat(),
                                                        Z = stream.ReadFloat()
                                                    },
                                        Up = new Vector3
                                                    {
                                                        X = stream.ReadFloat(),
                                                        Y = stream.ReadFloat(),
                                                        Z = stream.ReadFloat()
                                                    }
                                    };
                SpawnPosition.Forward = Vector3.Cross(
                    SpawnPosition.Right,
                    SpawnPosition.Up);

                stream.SeekTo(stream.Position + 0x0B);
                Team = stream.ReadByte();

                stream.SeekTo(stream.Position + 0x01);
                RespawnTime = stream.ReadByte();

                stream.SeekTo(stream.Position + 0x12);
            }