protected void Finish() { if (_infoFullscreenGroup != null) { _infoFullscreenGroup.GetComponent <InfoFullscreen>().ButtonTotal.onClick.AddListener(new UnityEngine.Events.UnityAction(BackToMenu)); } StartCoroutine(RoomFinishedCoroutine()); }
public virtual void WinGame() { HasWon = true; StartCoroutine(RoomFinishedCoroutine()); if (InfoFullscreenGroup != null) { SetInfoVisuals(); InfoFullscreenGroup.GetComponent <InfoFullscreen>().ButtonTotal.onClick.AddListener(new UnityEngine.Events.UnityAction(BackToMenu)); } Debug.Log("Hooray! You won!"); }
// Use this for initialization void Start() { CameraManager.Instance.Enabled = CurrentRoom.CameraEnabled; CurrentRoom.Initialize(); CurrentRoom.Enter(); CurrentRoom.FinishedEvent.AddListener(OnRoomCommonPickablesCollected); AudioManager.Instance.PlayMusic(CurrentRoom.AmbientTheme, 0.5f); ItemInfoGroup.gameObject.SetActive(false); if (PauseMenuGroup != null) { PauseMenuGroup.gameObject.SetActive(false); } if (EndingInfoFullscreen != null) { EndingInfoFullscreen.gameObject.SetActive(false); EndingInfoFullscreen.GetComponent <InfoFullscreen>().ButtonTotal.onClick.AddListener(new UnityEngine.Events.UnityAction(EndRoom)); } }