// Start is called before the first frame update void Start() { scene = GameObject.Find("SceneManager").GetComponent <SceneController>(); sceneSaver = sceneSaver = GameObject.Find("GameSave").GetComponent <SaveScene>(); msgText = msgObject.GetComponent <Text>(); colliding = false; }
// Token: 0x06002140 RID: 8512 public bool LoadFromReader(BinaryReader reader) { this.Scenes.Clear(); this.PendingScenes.Clear(); if (reader.ReadString() != "SaveGameData") { return(false); } SaveGameData.CurrentSaveFileVersion = reader.ReadInt32(); int num = reader.ReadInt32(); for (int i = 0; i < num; i++) { SaveScene saveScene = new SaveScene(); saveScene.SceneGUID = new MoonGuid(reader.ReadBytes(16)); this.Scenes.Add(saveScene.SceneGUID, saveScene); int num2 = reader.ReadInt32(); for (int j = 0; j < num2; j++) { SaveObject item = new SaveObject(new MoonGuid(reader.ReadBytes(16))); item.Data.ReadMemoryStreamFromBinaryReader(reader); saveScene.SaveObjects.Add(item); } } return(true); }
public void OnSaveAnimation() { var newScene = SaveScene.GetInstance(_core); newScene.Animation = _animation; _core.Scenes.Push(newScene); }
// Start is called before the first frame update void Start() { badges = transform.Find(findObjectName).gameObject; badges.SetActive(false); scene = GameObject.Find("SceneManager").GetComponent <SceneController>(); sceneSaver = sceneSaver = GameObject.Find("GameSave").GetComponent <SaveScene>(); msgText = msgObject.GetComponent <Text>(); colliding = false; }
// Start is called before the first frame update void Awake() { childGameObject1 = transform.Find("Laser1").gameObject; childGameObject2 = transform.Find("Laser2").gameObject; childGameObject3 = transform.Find("Laser3").gameObject; questionZones = GameObject.Find("QuestionZones"); laser = GetComponent <AudioSource>(); sceneSaver = GameObject.Find("GameSave").GetComponent <SaveScene>(); hSpawner = GameObject.Find("GameHandler").GetComponent <HazardSpawner3>(); }
// Token: 0x06002143 RID: 8515 public SaveScene InsertScene(MoonGuid sceneGuid) { SaveScene saveScene; if (this.Scenes.TryGetValue(sceneGuid, out saveScene)) { return(saveScene); } saveScene = new SaveScene { SceneGUID = sceneGuid }; this.Scenes.Add(saveScene.SceneGUID, saveScene); return(saveScene); }
// Token: 0x06003898 RID: 14488 public void LoadCustomData(ArrayList data) { SaveScene saveScene = new SaveScene(); saveScene.SceneGUID = (MoonGuid)data[0]; this.Scenes.Add(saveScene.SceneGUID, saveScene); for (int i = 1; i < data.Count; i++) { SaveObject saveObject = new SaveObject((MoonGuid)((object[])data[i])[0]); byte[] array = (byte[])((object[])data[i])[1]; BinaryReader binaryReader = new BinaryReader(new MemoryStream(array)); int num = array.Length; saveObject.Data.MemoryStream.SetLength((long)num); binaryReader.Read(saveObject.Data.MemoryStream.GetBuffer(), 0, num); saveScene.SaveObjects.Add(saveObject); } }
private void Start() { Instance = this; warningGroup.Deactivate(); namingGroup.Deactivate(); CreateMapDirectory(); }
// Token: 0x06002152 RID: 8530 public bool LoadFromReader(BinaryReader reader) { this.Scenes.Clear(); this.PendingScenes.Clear(); if (reader.ReadString() != "SaveGameData") { return(false); } SaveGameData.CurrentSaveFileVersion = reader.ReadInt32(); int num = reader.ReadInt32(); bool logging = RandomizerSettings.BashDeadzone > 0.9f; bool reading = RandomizerSettings.AbilityMenuOpacity > 0.9f; Hashtable DifferentDataMap = new Hashtable(); if (reading) { string[] array = File.ReadAllLines("datamap.dat"); for (int i = 0; i < array.Length; i += 2) { DifferentDataMap[array[i]] = array[i + 1]; } } for (int j = 0; j < num; j++) { SaveScene saveScene = new SaveScene(); saveScene.SceneGUID = new MoonGuid(reader.ReadBytes(16)); if (logging) { Randomizer.log("SCENE"); Randomizer.log(saveScene.SceneGUID.ToString()); } this.Scenes.Add(saveScene.SceneGUID, saveScene); int num2 = reader.ReadInt32(); for (int k = 0; k < num2; k++) { SaveObject saveObject = new SaveObject(new MoonGuid(reader.ReadBytes(16))); if (logging) { Randomizer.log(saveObject.Id.ToString()); } saveObject.Data.ReadMemoryStreamFromBinaryReader(reader); if (logging) { string str = ""; for (int l = 0; l < saveObject.Data.MemoryStream.GetBuffer().Length; l++) { str = str + saveObject.Data.MemoryStream.GetBuffer()[l].ToString() + " "; } Randomizer.log(str); } if (reading && DifferentDataMap.ContainsKey(saveObject.Id.ToString())) { saveObject.Data = new Archive(); string[] array2 = ((string)DifferentDataMap[saveObject.Id.ToString()]).Split(new char[] { ' ' }); byte[] bytes = new byte[array2.Length]; for (int m = 0; m < array2.Length; m++) { bytes[m] = Convert.ToByte(array2[m]); } BinaryReader binaryReader = new BinaryReader(new MemoryStream(bytes)); saveObject.Data.MemoryStream.SetLength((long)bytes.Length); binaryReader.Read(saveObject.Data.MemoryStream.GetBuffer(), 0, bytes.Length); } saveScene.SaveObjects.Add(saveObject); } } return(true); }