Inheritance: MonoBehaviour
 void MoveFocusTo( CreditsButton newFocusedButton )
 {
     if (newFocusedButton != null)
     {
         focusedButton = newFocusedButton;
     }
 }
Ejemplo n.º 2
0
 public void BackToMenu()
 {
     startButton.SetActive(true);
     CreditsButton.SetActive(true);
     exitButton.SetActive(true);
     Destroy(GameObject.FindGameObjectWithTag("BackButton"));
     Destroy(GameObject.FindGameObjectWithTag("CreditsText"));
 }
Ejemplo n.º 3
0
 IEnumerator SpawnCredits()
 {
     for (int i = 0; i < names.Length; i++)
     {
         CreditsButton cb = Instantiate(creditsButton, new Vector3(Camera.main.ViewportToWorldPoint(new Vector2(Random.value, 0)).x, Camera.main.ViewportToWorldPoint(new Vector2(0, 1)).y, 0), creditsButton.transform.rotation);
         cb.SetText(names[i]);
         yield return(new WaitForSeconds(1));
     }
 }
Ejemplo n.º 4
0
 public void helpBackClicked()
 {
     HelpText.SetActive(false);
     HelpBackButton.SetActive(false);
     StartButton.SetActive(true);
     CreditsButton.SetActive(true);
     ExitButton.SetActive(true);
     HelpButton.SetActive(true);
 }
Ejemplo n.º 5
0
 public void creditsClicked()
 {
     BackCreditsButton.SetActive(true);
     CreditsText.SetActive(true);
     StartButton.SetActive(false);
     CreditsButton.SetActive(false);
     ExitButton.SetActive(false);
     HelpButton.SetActive(false);
 }
Ejemplo n.º 6
0
    public void Credits()
    {
        startButton.SetActive(false);
        CreditsButton.SetActive(false);
        exitButton.SetActive(false);

        Button backButton = Instantiate(back);

        backButton.transform.SetParent(this.transform, false);
        //backButton.gameObject.SetActive(true);
        backButton.onClick.AddListener(BackToMenu);

        Text credits = Instantiate(creditsText);

        credits.transform.SetParent(this.transform, false);
    }
Ejemplo n.º 7
0
 void Update()
 {
     Classic = StartButton.GetComponent <ClickItem>().Clicked;
     if (Classic == true)
     {
         ClassicStart();
     }
     Quit = QuitButton.GetComponent <ClickItem>().Clicked;
     if (Quit == true)
     {
         QuitGame();
     }
     Info = InfoButton.GetComponent <ClickItem>().Clicked;
     if (Info == true)
     {
         InfoStart();
     }
     Credits = CreditsButton.GetComponent <ClickItem>().Clicked;
     if (Credits == true)
     {
         CreditsStart();
     }
 }