public void ButtonPressed(ButtonEventArg e) { uint playerIndex = e.playerIndex; uint code = (uint)e.button; stage.buttonPressed(playerIndex, code); }
public void ExitButton_OnClick(object sender, ButtonEventArg e) { StageManager.Singleton.NextStage = e.Link; }
void buyButton_OnClick(object sender, ButtonEventArg e) { string wantCar = e.Link; Player player = Player.Singleton; CarGarage garage = CarGarage.Singleton; if (!player.IsPurchased(wantCar)) { if (player.PurchaseCar(wantCar)) { player.CarName = wantCar; } else { Paused = true; } } else { player.CarName = wantCar; } playerCar.CopyCat(garage.Get(player.CarName)); }
void Button_OnClick(object sender, ButtonEventArg e) { StageManager.Singleton.NextStage = e.Link; Player.Singleton.PickupMoney = 0; }
void ATMButton_OnClick(object sender, ButtonEventArg e) { Player player = Player.Singleton; if ((Convert.ToInt16(e.Link) >= (int)ATMButton._1 && Convert.ToInt16(e.Link) <= (int)ATMButton._9)) { if (sendMoney == "0") { sendMoney = ""; } sendMoney += Convert.ToString(Convert.ToInt16(e.Link) + 1); } else if ((Convert.ToInt16(e.Link) == (int)ATMButton._0)) { sendMoney += "0"; } else if ((Convert.ToInt16(e.Link) == (int)ATMButton.Cancel)) { sendMoney = "0"; } else if ((Convert.ToInt16(e.Link) == (int)ATMButton.Send)) { if (sendMoney != "0") { player.Money -= Convert.ToInt32(sendMoney); player.Debt -= Convert.ToInt32(sendMoney); sendMoney = "0"; cashSound.Play(); } } }