Exemplo n.º 1
0
 bool airportPayCheck(airport currentPlace, playerToken currentPlayer)
 {
     if (currentPlace.Owned == false)
     {
         return(true);
     }
     else
     {
         //pay
         if (currentPlayer.money > currentPlace.RentPrice())
         {
             desc = "PAY " + currentPlace.RentPrice();
             if (GUI.Button(new Rect(Screen.width * .03f, Screen.height * .1f, Screen.width * .3f, Screen.height * .1f), "PAY"))
             {
                 currentPlace.Pay(currentPlayer);
                 VariableManager.turn = 2;
             }
         }
         //sell
         if (GUI.Button(new Rect(Screen.width * .03f, Screen.height * .4f, Screen.width * .3f, Screen.height * .1f), "SELL"))
         {
             this.yourArray       = new List <bool>(currentPlayer.places.Count);
             this.offSet          = 0;
             VariableManager.turn = 5;
         }
         //surrender
         if (currentPlayer.money < currentPlace.RentPrice())
         {
             if (GUI.Button(new Rect(Screen.width * .03f, Screen.height * .5f, Screen.width * .2f, Screen.height * .1f), "SURRENDER"))
             {
                 currentPlayer.surrender();
             }
         }
     }
     return(false);
 }