Exemplo n.º 1
0
 void serverButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         menuManager.ChangeToMenu(serverMenu);
     }
 }
Exemplo n.º 2
0
 void clientButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         menuManager.ChangeToMenu(clientMenu);
     }
 }
Exemplo n.º 3
0
 void exitButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         Application.LoadLevel(0);
     }
 }
Exemplo n.º 4
0
 void backButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         menuManager.ChangeToMenu(mainMenu);
     }
 }
Exemplo n.º 5
0
 void playButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         menuManager.ChangeToMenu(playMenu);
     }
 }
Exemplo n.º 6
0
 void exitButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         Application.Quit();
     }
 }
Exemplo n.º 7
0
 void startButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         server.StartGame();
     }
 }
Exemplo n.º 8
0
 void disconnectButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         menuManager.ChangeToMenu(clientMenu);
         lings.Client.Disconnect();
     }
 }
Exemplo n.º 9
0
 void connectButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         connectingMenu.ipAddress = ipAddress;
         menuManager.ChangeToMenu(connectingMenu);
     }
 }
Exemplo n.º 10
0
 void reconnectButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         dots = ".";
         button.gameObject.SetActive(false);
         reconnecting = true;
         lings.Client.Connect();
     }
 }
Exemplo n.º 11
0
 void disconnectButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         LiNGSClientManager lings = GameObject.FindObjectOfType <LiNGSClientManager>();
         if (lings != null)
         {
             lings.Client.Disconnect();
         }
     }
 }
Exemplo n.º 12
0
 void exitButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         NetworkServer ns = GameObject.FindObjectOfType <NetworkServer>();
         if (ns != null)
         {
             ns.Shutdown();
         }
         Application.LoadLevel(0);
     }
 }
Exemplo n.º 13
0
 void resumeButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         foreach (var item in joysticks)
         {
             item.gameObject.SetActive(true);
         }
         hud.gameObject.SetActive(true);
         gameObject.SetActive(false);
     }
 }
Exemplo n.º 14
0
 void exitButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
     if (newState == MenuButton.ButtonState.Normal)
     {
         LiNGSClientManager lings = GameObject.FindObjectOfType <LiNGSClientManager>();
         if (lings != null)
         {
             lings.Client.Disconnect();
         }
         NetworkServer ns = GameObject.FindObjectOfType <NetworkServer>();
         if (ns != null)
         {
             ns.Shutdown();
         }
         Application.LoadLevel(0);
     }
 }
Exemplo n.º 15
0
 void optionsButton_OnAction(MenuButton button, MenuButton.ButtonState newState)
 {
 }