예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     global = GameObject.Find("Menu").GetComponent <GlobalMenueScript>();
     //audioController
     music = GameObject.Find("Music");
     music.GetComponentInChildren <Text>().text = "Music";
     //controlador de efectos especiales
     fxSound = GameObject.Find("FX");
     fxSound.GetComponentInChildren <Text>().text = "FX";
     //controlador back button
     backButton = GameObject.Find("BackButton");
     backButton.GetComponentInChildren <Text>().text = "Back";
     backButton.GetComponentInChildren <Button>().onClick.AddListener(() => MainMenuActivation());
 }
예제 #2
0
 void Awake()
 {
     //global
     global = GameObject.Find("Menu").GetComponent <GlobalMenueScript>();
     //title
     title = GameObject.Find("Title");
     title.GetComponent <Text>().color    = Color.white;
     title.GetComponent <Text>().text     = "The Reaper Quest";
     title.GetComponent <Text>().fontSize = 28;
     //play
     playButton = GameObject.Find("Play");
     playButton.GetComponentInChildren <Text>().text = "Play";
     playButton.GetComponentInChildren <Button>().onClick.AddListener(() => SceneManager.LoadScene(1));
     //options
     optionButton = GameObject.Find("Option");
     optionButton.GetComponentInChildren <Text>().text = "Options";
     optionButton.GetComponentInChildren <Button>().onClick.AddListener(() => OptionActivation());
     //exit
     quitButton = GameObject.Find("Quit");
     quitButton.GetComponentInChildren <Text>().text = "Quit";
     quitButton.GetComponentInChildren <Button>().onClick.AddListener(() => Application.Quit());
 }