예제 #1
0
 public void Pay()
 {
     if (PlayGlobalVariables.experience >= 7000)
     {
         if ((PlayGlobalVariables.money - PlayGlobalVariables.experience) < 0)
         {
             ship.GoToWorld1();
             Close();
         }
         else
         {
             PlayGlobalVariables.reduceMoney(7000);
             ship.GoToWorld1();
             Close();
         }
     }
     else if (PlayGlobalVariables.money >= 7000)
     {
         PlayGlobalVariables.reduceMoney(7000);
         ship.GoToWorld1();
         Close();
     }
     else
     {
         text.text = "You don't have enough money ";
     }
 }
예제 #2
0
    public void EnterCheatCode()
    {
        string strCheat = inputCheat.text.ToLower();

        if (strCheat.Equals("money100"))
        {
            PlayGlobalVariables.addMoney(100);
        }
        else if (strCheat.Equals("money1000"))
        {
            PlayGlobalVariables.addMoney(1000);
        }
        else if (strCheat.Equals("money2000"))
        {
            PlayGlobalVariables.addMoney(2000);
        }
        else if (strCheat.Equals("debt100"))
        {
            PlayGlobalVariables.reduceMoney(100);
        }
        else if (strCheat.Equals("xdebt100"))
        {
            PlayGlobalVariables.reduceMoneyAndExperience(100);
        }

        inputCheat.text = "";
    }
예제 #3
0
 public void Pay2()
 {
     if (PlayGlobalVariables.experience >= 14000)
     {
         if (((PlayGlobalVariables.money + 7000) - PlayGlobalVariables.experience) < 0)
         {
             Application.LoadLevel(20);
         }
         else
         {
             PlayGlobalVariables.reduceMoney(7000);
             Application.LoadLevel(20);
         }
     }
     if (PlayGlobalVariables.money >= 7000)
     {
         PlayGlobalVariables.reduceMoney(7000);
         Application.LoadLevel(21);
     }
     else
     {
         text.text = "You don't have enough money ";
     }
 }