예제 #1
0
    public void PlayGame()
    {
        if (locked.GetLock(0) == 0 || locked.GetLock(3) == 1)
        {
            Time.timeScale = 1f;
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
        }

        else
        {
            Time.timeScale = 1f;
            SceneManager.LoadScene("Level1");
        }
    }
예제 #2
0
 IEnumerator myCor()
 {
     if (locked.GetLock(4) == 0)
     {
         achievementNotificationController.ShowNotification(database.achievements[4]);
         locked.Unlock(4);
         locked.Date(4);
         moveSpeed = 0f;
         yield return(new WaitForSeconds(3));
     }
     ded.Dead();
 }
예제 #3
0
    IEnumerator myCor()
    {
        int i = 0;

        switch (Name.name)
        {
        case "Cameras":
            i = 1;
            break;

        case "QTE":
            i = 2;
            break;

        case "Painting":
            i = 3;
            break;

        default:
            i = 0;
            break;
        }

        if (locked.GetLock(i) == 0)
        {
            task.SetActive(false);
            achievementNotificationController.ShowNotification(database.achievements[i]);
            locked.Unlock(i);
            locked.Date(i);
        }
        yield return(new WaitForSeconds(3));

        task.SetActive(true);
        if (i == 3)
        {
            end.End();
        }
        if (i == 1)
        {
            TaskText.text = "go upstairs";
        }
    }
예제 #4
0
 public void Restart()
 {
     if (locked.GetLock(1) == 0)
     {
         SceneManager.LoadScene("Level1");
     }
     else if (locked.GetLock(2) == 0 && locked.GetLock(1) == 1)
     {
         player.transform.position = cam.transform.position;
     }
     else if (locked.GetLock(3) == 0 && locked.GetLock(2) == 1 && locked.GetLock(1) == 1)
     {
         player.transform.position = qte.transform.position;
     }
     Time.timeScale = 1f;
 }