From 25ae865600134ffa4a62316e50cec66c5fe6734b Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 3 Jul 2020 16:09:41 +0200 Subject: [PATCH] fixed some more possible overflow exceptions --- TouchyTickets/Ui.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TouchyTickets/Ui.cs b/TouchyTickets/Ui.cs index 6b20d14..c5dd8cf 100644 --- a/TouchyTickets/Ui.cs +++ b/TouchyTickets/Ui.cs @@ -168,7 +168,7 @@ namespace TouchyTickets { ActionSound = new SoundEffectInfo(Assets.PlaceSound), OnPressed = e2 => { GameImpl.Instance.Tickets -= price; - GameImpl.Instance.Platform.AddResourceEvent(true, "Tickets", (long) price, "Attraction", attraction.Key); + GameImpl.Instance.Platform.AddResourceEvent(true, "Tickets", (float) price, "Attraction", attraction.Key); map.Place(map.PlacingPosition, map.PlacingAttraction); map.PlacingAttraction.Wobble(); @@ -249,7 +249,7 @@ namespace TouchyTickets { if (GameImpl.Instance.Tickets < price) break; GameImpl.Instance.Tickets -= price; - GameImpl.Instance.Platform.AddResourceEvent(true, "Tickets", (long)price, "Modifier", modifier.Name); + GameImpl.Instance.Platform.AddResourceEvent(true, "Tickets", (float) price, "Modifier", modifier.Name); attraction.ApplyModifier(map.PlacingModifier); } attraction.Wobble(); @@ -334,7 +334,7 @@ namespace TouchyTickets { this.uiSystem.Remove(e2.Root.Name); var game = GameImpl.Instance; - game.Platform.AddResourceEvent(true, "Tickets", (long) game.Tickets, "Restart", "Restart" + game.TimesRestarted); + game.Platform.AddResourceEvent(true, "Tickets", (float) game.Tickets, "Restart", "Restart" + game.TimesRestarted); game.Platform.AddResourceEvent(false, "Stars", game.GetBuyableStars(), "Restart", "Restart" + game.TimesRestarted); game.Stars += game.GetBuyableStars();