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 "; } }
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 = ""; }
public void clickThis() { if (int.TryParse(text.text, out decoy)) { int n = int.Parse(text.text); PlayGlobalVariables.addMoney(n); Application.LoadLevel(level); } }
// Use this for initialization void Start() { audioSource = GetComponent <AudioSource>(); if (isMusic) { audioSource.volume = PlayGlobalVariables.getMusicVolume(); } else { audioSource.volume = PlayGlobalVariables.getEffectsVolume(); } }
public void gameOver(int score) { if (PlayGlobalVariables.hasEnoughExperience(requiredExp) == false) { if (score <= 0) { mainText.text = "Game Over. Please practice more"; score = 0; } else if (score <= 2) { mainText.text = "You could do better. Practice more"; } else if (score <= 3) { mainText.text = "Not bad. A little practice can help"; } else if (score == 4) { mainText.text = "Almost perfect. Great job"; } else { mainText.text = "Perfect!"; } int earned = score * 200; money.text = "" + earned; PlayGlobalVariables.addMoney(earned); } else { mainText.text = "You have enough experience."; money.text = "0"; } ShopGlobals.running = false; stopGame(); GetComponent <Animator> ().SetBool("active", true); }
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 "; } }