Exemple #1
0
 public void buttonOnClick(Button GO)
 {
     if (CurrentButtonText.text == "Play" && GO == PlayButton)
     {
         StaticVarsNFuns.SGoToModeSelect();
     }
     else if (CurrentButtonText.text == "Settings" && GO == SettingButton)
     {
         StaticVarsNFuns.SGoToSettings();
     }
     else if (CurrentButtonText.text == "Shop" && GO == ShopButton)
     {
         StaticVarsNFuns.SGoToShop();
     }
     else if (CurrentButtonText.text == "Highscore" && GO == ScoreButton)
     {
         StaticVarsNFuns.SGoToHighscore();
     }
     else if (CurrentButtonText.text == "Quit" && GO == QuitButton)
     {
         popUp.launch("Do you wish exit the game?");
     }
     if (!isDrag)
     {
         currentButton = GO;
         isClick       = true;
     }
 }
Exemple #2
0
 public void onMultiButtClick()
 {
     if (!currentWeapon.purchased && realMoney > currentWeapon.price)
     {
         buyPopUp.launch("Buy " + currentWeapon.name + " for " + "$" + currentWeapon.price + "?");
     }
     else if (currentWeapon.purchased && !currentWeapon.equiped)
     {
         equipPopUp.launch("Equip Mode");
         equipable = true;
     }
     else if (currentWeapon.purchased && currentWeapon.equiped)
     {
         unequipWeap();
     }
 }