public void SaveGame() { FileStream file = File.Open(Application.persistentDataPath + "/teleporteurInfo.dat", FileMode.Create); TeleporteurData data = new TeleporteurData(); data.teleporterAcces = TeleporterAccesManager.getTeleporterAccess(); BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(file, data); file.Close(); }
private void enterTeleporter() { if (TeleporterAccesManager.GetAccess(tptag)) { teleportHasBeenUsed = true; SceneManager.LoadScene(linkScene); } else { changeMessageState(); DialogManager.RemoveMessage(); } }
private void OnTriggerExit2D(Collider2D collision) { if (!messagehaveBeenShowen) { if (collision.tag == "Player") { if (!TeleporterAccesManager.GetAccess(tpTag)) { TeleporterAccesManager.unlockTeleporteur(tpTag); try { TeleporteurInfoController.teleporteurInfoController.SaveGame(); } catch { } } showUnlockMessage(); } } }
// Use this for initialization void Start() { TeleporterAccesManager.teleporterAccesManager(); }
// Use this for initialization void Start() { TeleporterAccesManager.lockAllTeleporter(); }
private void LockTeleporter() { TeleporterAccesManager.lockAllTeleporter(); }