예제 #1
0
 protected void Finish()
 {
     if (_infoFullscreenGroup != null)
     {
         _infoFullscreenGroup.GetComponent <InfoFullscreen>().ButtonTotal.onClick.AddListener(new UnityEngine.Events.UnityAction(BackToMenu));
     }
     StartCoroutine(RoomFinishedCoroutine());
 }
예제 #2
0
    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!");
    }
예제 #3
0
    // 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));
        }
    }