Exemple #1
0
 /// <summary>
 /// Defines what should happen when hovering over this script's object.
 /// </summary>
 public void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(0))
     {
         SceneChange.LoadSceneFromMenu("Tutorial");
         Portrait.GetInstance().gameObject.SetActive(true);
         Player.GetInstance().StartStarving(30);
         Player.GetInstance().DialogueLine = 0;
     }
 }
Exemple #2
0
 /// <summary>
 /// Defines what should happen when hovering over this scripts' object.
 /// </summary>
 public void OnMouseOver()
 {
     if (Input.GetMouseButtonDown(0))
     {
         Portrait.GetInstance().gameObject.SetActive(true);
         string path = Application.persistentDataPath + "/" + "save1.dat";
         Debug.Log(path);
         sv.Load(path);
         Player.GetInstance().StopStarving();
         Player.GetInstance().StartStarving(0);
     }
 }
Exemple #3
0
    /// <summary>
    /// Update is called once per frame.
    /// </summary>
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            switch (SceneManager.GetActiveScene().name)
            {
            case "menu":
                SceneChange.LoadScene(Player.GetInstance().CurrentLevel);
                Portrait.GetInstance().gameObject.SetActive(true);
                Player.GetInstance().StartStarving(0);
                break;

            default:
                SceneManager.LoadScene("menu", LoadSceneMode.Single);
                Portrait.GetInstance().gameObject.SetActive(false);
                Player.GetInstance().StopStarving();
                break;
            }
        }
    }