public void Read(ref BinaryReader br, LUZData myLUZ)
 {
     filename = StringUtils.ReadString(ref br);
     sceneID  = br.ReadByte();
     br.BaseStream.Position += 3; // Skip 3 bytes
     isAudioScene            = br.ReadByte();
     br.BaseStream.Position += 3; // Skip 3 bytes
     sceneName = StringUtils.ReadString(ref br);
     br.BaseStream.Position += 3; // Skip 3 bytes
     /// TODO: sceneData
 }
 public void Read(ref BinaryReader br, LUZData myLUZ)
 {
     if (myLUZ.version < 0x25)
     {
         sceneTransitionName = StringUtils.ReadString(ref br);
     }
     sceneTransitionPoints = new SceneTransitionPoint[(myLUZ.version <= 0x21 || myLUZ.version >= 0x27) ? 2 : 5];
     for (int i = 0; i < sceneTransitionPoints.Length; ++i)
     {
         sceneTransitionPoints[i].Read(ref br);
     }
 }
示例#3
0
 public static void Open(string filename)
 {
     if (reader == null && fileName == null)
     {
         fileName = filename;
         reader   = new BinaryReader(File.Open(fileName, FileMode.Open));
         data     = new LUZData();
         data.Read(ref reader);
         File.WriteAllText(data.terrainDescription + ".json", JsonConvert.SerializeObject(data));
     }
     else
     {
         Close();
         throw new Exception("Another world is already open");
     }
 }