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.

68 lines
1.5 KiB

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. public class MainMenuControllerClient : MonoBehaviour
  6. {
  7. public GameObject SettingsMenu;
  8. public GameObject MainMenu;
  9. public GameObject HowToPlayMenu_aim;
  10. public GameObject HowToPlayMenu_inventory;
  11. //On Awake
  12. private void Awake ()
  13. {
  14. MainMenu.SetActive (true);
  15. SettingsMenu.SetActive (false);
  16. HowToPlayMenu_aim.SetActive (false);
  17. HowToPlayMenu_inventory.SetActive(false);
  18. }
  19. //Main Menu Options
  20. public void OnPlayClick ()
  21. {
  22. UnityEngine.SceneManagement.SceneManager.LoadScene ("LoginScreen");
  23. }
  24. public void OnSettingsClick ()
  25. {
  26. //toggle which menu displays
  27. MainMenu.SetActive (false);
  28. SettingsMenu.SetActive (true);
  29. }
  30. public void OnTutorialClick ()
  31. {
  32. MainMenu.SetActive (false);
  33. HowToPlayMenu_aim.SetActive (true);
  34. }
  35. public void OnTutorialContinueAimClick ()
  36. {
  37. HowToPlayMenu_aim.SetActive(false);
  38. HowToPlayMenu_inventory.SetActive(true);
  39. }
  40. public void OnTutorialContinueInventroyClick()
  41. {
  42. UnityEngine.SceneManagement.SceneManager.LoadScene("TuteLevelOne");
  43. }
  44. //Settings Menu
  45. public void OnBackClick ()
  46. {
  47. //Settings menu
  48. SettingsMenu.SetActive (false);
  49. MainMenu.SetActive (true);
  50. }
  51. //Settings Menu
  52. public void OnBacktomainmenuClick()
  53. {
  54. HowToPlayMenu_aim.SetActive(false);
  55. HowToPlayMenu_inventory.SetActive(false);
  56. MainMenu.SetActive(true);
  57. }
  58. }