Esempio n. 1
0
 private void Update()
 {
     if (Input.GetKeyDown("9"))
     {
         menuScript.LoadGame(_inkStory, 0);
         UpdateText();
     }
 }
Esempio n. 2
0
    void Awake()
    {
        _inkStory  = new Story(inkAsset.text);
        menuScript = GameObject.Find("MenuScript").GetComponent <MenuScript>();

        while (_inkStory.canContinue)
        {
            screenText.text = _inkStory.Continue();
        }

        UpdateButtons();

        if (PlayerPrefs.GetInt("loadIndicator", -1) != -1)
        {
            menuScript.LoadGame(_inkStory, PlayerPrefs.GetInt("loadIndicator"));
            UpdateText();
            PlayerPrefs.SetInt("loadIndicator", -1);
        }
    }
Esempio n. 3
0
 public void OnPointerDown(PointerEventData eventData)
 {
     Debug.Log("Pressed " + gameObject.name);
     if (gameObject.name == "Start Game")
     {
         MS.LoadGame();
     }
     else if (gameObject.name == "Offline Challenges")
     {
         MS.LoadOffline();
     }
     else if (gameObject.name == "Leaderboards")
     {
         MS.LoadLeaderboards();
     }
     else if (gameObject.name == "Settings")
     {
         MS.LoadSettings();
     }
     else if (gameObject.name == "Exit")
     {
         MS.ExitGame();
     }
 }