예제 #1
0
 public void buttonAguilaOnClick()
 {
     if (!currentTotem.GetComponent <ContModules>().hasMaxModules())
     {
         if (enoughMoney())
         {
             currentTotem.GetComponent <SimpleTotem> ().AddAguilaTotem();
             currentTotem.GetComponent <ContModules> ().incrementContModules();
             saveModuleToData(1);
             pay();
         }
         else
         {
             string p;
             if (isPlayerRed)
             {
                 p = "RED";
             }
             else
             {
                 p = "BLUE";
             }
             dinero.showWarning(p, "ALLIGATOR MODULE");
         }
     }
 }
예제 #2
0
    public void addNewPlayerRed()
    {
        if (dineroController.redHasEnoughMoneyForTotem())
        {
            switch (contRed)
            {
            case 1:
                totem2Red.gameObject.SetActive(true);
                break;

            case 2:
                totem3Red.gameObject.SetActive(true);
                break;

            case 3:
                totem4Red.gameObject.SetActive(true);
                break;

            case 4:
                totem5Red.gameObject.SetActive(true);
                break;

            default:
                break;
            }
            ;
            dineroController.redBuysTotem();
            dineroController.updateTexts();
            Debug.Log("Red" + dineroController.getRedMoney());
            if (contRed < MAXPLAYERS)
            {
                contRed++;
            }
        }
        else
        {
            dineroController.showWarning("RED", "TOTEM");
        }
    }