private void Update()
 {
     if (Input.GetKeyDown("9"))
     {
         menuScript.LoadGame(_inkStory, 0);
         UpdateText();
     }
 }
    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);
        }
    }
Example #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();
     }
 }