You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
653 B

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.SceneManagement;
  5. public class MainMenu : MonoBehaviour
  6. {
  7. public GameObject menu;
  8. public GameObject credits;
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. menu.SetActive(true);
  13. credits.SetActive(false);
  14. }
  15. public void SwapCanvas()
  16. {
  17. menu.SetActive(!menu.activeSelf);
  18. credits.SetActive(!credits.activeSelf);
  19. }
  20. public void StartGame()
  21. {
  22. SceneManager.LoadScene(1);
  23. }
  24. // Update is called once per frame
  25. void Update()
  26. {
  27. }
  28. }