Inheritance: MonoBehaviour
 void MoveFocusTo( CreditsButton newFocusedButton )
 {
     if (newFocusedButton != null)
     {
         focusedButton = newFocusedButton;
     }
 }
Beispiel #2
0
 public void BackToMenu()
 {
     startButton.SetActive(true);
     CreditsButton.SetActive(true);
     exitButton.SetActive(true);
     Destroy(GameObject.FindGameObjectWithTag("BackButton"));
     Destroy(GameObject.FindGameObjectWithTag("CreditsText"));
 }
Beispiel #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));
     }
 }
Beispiel #4
0
 public void helpBackClicked()
 {
     HelpText.SetActive(false);
     HelpBackButton.SetActive(false);
     StartButton.SetActive(true);
     CreditsButton.SetActive(true);
     ExitButton.SetActive(true);
     HelpButton.SetActive(true);
 }
Beispiel #5
0
 public void creditsClicked()
 {
     BackCreditsButton.SetActive(true);
     CreditsText.SetActive(true);
     StartButton.SetActive(false);
     CreditsButton.SetActive(false);
     ExitButton.SetActive(false);
     HelpButton.SetActive(false);
 }
Beispiel #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);
    }
 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();
     }
 }