internal void _Read(TableStreamReader reader) { reader.Blob("SceneObjectData", () => { Read(reader); }); }
private void _Read(TableStreamReader reader) { reader.Blob("SceneChunkData", () => { this.Name = reader.ReadKeyString("Name"); this.Objects = new List <SceneObjectData>(); var count = reader.ReadKeyNumber("Objects"); for (var i = 0; i < count; ++i) { var type = (SceneObjectType)reader.ReadKeyByte("Type"); SceneObjectData objectData = null; switch (type) { case SceneObjectType.PREFAB: objectData = new ScenePrefabData(); break; case SceneObjectType.LIGHTMODIFIER: objectData = new SceneLightModifierData(); break; default: objectData = new SceneObjectData(); break; } objectData._Read(reader); this.Objects.Add(objectData); } }); }
internal void _Read(TableStreamReader reader) { reader.Blob("SceneChunkRefData", () => { this.Name = reader.ReadKeyString("Name"); this.PositionX = (float)reader.ReadKeyFloat("PositionX"); this.PositionY = (float)reader.ReadKeyFloat("PositionY"); this.PositionZ = (float)reader.ReadKeyFloat("PositionZ"); this.OrientationX = (float)reader.ReadKeyFloat("OrientationX"); this.OrientationY = (float)reader.ReadKeyFloat("OrientationY"); this.OrientationZ = (float)reader.ReadKeyFloat("OrientationZ"); this.OrientationW = (float)reader.ReadKeyFloat("OrientationW"); this.Path = reader.ReadKeyString("Path"); }); }
private void _Read(TableStreamReader reader) { reader.Blob("SceneLevelData", () => { this.Name = reader.ReadKeyString("Name"); this.ChunkWidth = (float)reader.ReadKeyFloat("ChunkWidth"); this.ChunkHeight = (float)reader.ReadKeyFloat("ChunkHeight"); this.ChunkColumns = (int)reader.ReadKeyNumber("ChunkColumns"); this.ChunkRows = (int)reader.ReadKeyNumber("ChunkRows"); this.Chunks = new List <SceneChunkRefData>(); var count = reader.ReadKeyNumber("Chunks"); for (var i = 0; i < count; ++i) { var chunkRefData = new SceneChunkRefData(); chunkRefData._Read(reader); this.Chunks.Add(chunkRefData); } }); }