Exemplo 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();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Virtual definition of the onClick function.
 /// </summary>
 /// <param name="item">The MenuItem that will be clicked.</param>
 public virtual void onClick(MenuItem item)
 {
 }