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.

42 lines
683 B

  1. using UnityEngine;
  2. using System.Collections;
  3. public class menuController : MonoBehaviour {
  4. public GameObject settings;
  5. public GameObject credits;
  6. // Use this for initialization
  7. void Start () {
  8. }
  9. // Update is called once per frame
  10. void Update () {
  11. }
  12. public void startNewGame(string level){
  13. Application.LoadLevel (level);
  14. }
  15. public void exitGame(){
  16. Application.Quit ();
  17. }
  18. public void openPanel(string Str_panel){
  19. settings.SetActive (false);
  20. credits.SetActive (false);
  21. if (Str_panel == "settings")
  22. settings.SetActive (true);
  23. if (Str_panel == "credits")
  24. credits.SetActive (true);
  25. }
  26. public void closePanel(){
  27. openPanel ("None");
  28. }
  29. }