Esempio n. 1
0
 /// <summary>
 /// onClick Function
 /// Handles the clicking of any of the MenuItems displayed on the screen
 /// </summary>
 /// <param name="item"></param>
 public override void onClick(MenuItem item)
 {
     //If the button is play, start the game
     if(item.Equals(play)){
         (play as Button).act(startGame);
         buttonClick.Play();
     }
         //Otherwise, if the button is quit, exit the game
     else if(item.Equals(quit)){
         (quit as Button).act(exit);
         buttonClick.Play();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// onClick Function
 /// Handles the clicking of any of the MenuItems displayed on the screen
 /// </summary>
 /// <param name="item"></param>
 public override void onClick(MenuItem item)
 {
     //If the button is play, start the game
     if (item.Equals(play))
     {
         (play as Button).act(startGame);
     }
     //Otherwise, if the button is quit, exit the game
     else if (item.Equals(quit))
     {
         (quit as Button).act(exit);
     }
 }