Exemplo n.º 1
0
        //Continues the game and revives the player
        public void ContinueGame()
        {
            playerDed = false;
            StatKeeper.healPlayer();

            Debug.Log("Continuing game from the checkpoint");

            StatKeeper.resetHoboCoin();
            InventoryHandler.resetInventory();

            SceneManager.LoadScene(3);
        }
        void Start()
        {
            Destroy(GameObject.Find("GameController"));

            StatKeeper.resetHoboCoin();

            PlayButton  = GameObject.Find("Play").GetComponent <Button>();
            AboutButton = GameObject.Find("About").GetComponent <Button>();
            QuitButton  = GameObject.Find("Quit").GetComponent <Button>();

            AboutToggle = GameObject.Find("AboutToggle");
            ImageToggle = GameObject.Find("ImageToggle");

            PlayButton.onClick.AddListener(() => startGame());
            AboutButton.onClick.AddListener(() => toggleAbout());
            QuitButton.onClick.AddListener(() => Application.Quit());

            AboutToggle.SetActive(false);
        }