// Use this for initialization void Start() { _receivedPayload = GameObject.FindGameObjectWithTag("DreamPayload").GetComponent <DreamPayload>(); if (_receivedPayload == null) { return; } if (!_receivedPayload.DreamEnded) { return; } MainMenu.ChangeMenuState(UIMainMenu.MenuState.GRAPH); DreamDirector.AddPayloadToPriorDreams(_receivedPayload); DreamDirector.CurrentDay++; SaveGameManager.SaveCurrentGame(); // TODO: save game data to file // TODO: load from save file and populate graph _receivedPayload.ClearPayload(); Fader.FadeOut(0.5F); }
public void Update() { if (DreamDirector.CurrentlyInDream) { _dreamTimer += Time.deltaTime; } if (_dreamTimer > DreamDirector.DREAM_MAX_TIME) { DreamDirector.EndDream(); } }
// Use this for initialization void Start() { _receivedPayload = GameObject.FindGameObjectWithTag("DreamPayload").GetComponent <DreamPayload>(); DreamDirector.Player = GameObject.FindGameObjectWithTag("Player"); if (_receivedPayload == null) { Debug.LogError("Could not find dream payload! Did you come from the title screen?"); return; } DreamDirector.SwitchDreamLevel(_receivedPayload.InitialLevelToLoad); GameSettings.SetCursorViewState(false); GameSettings.CanControlPlayer = true; Fader.FadeOut(1F); }