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); } }
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); }