From ede5fa2b585cb4220583d7178b0c255079c96c32 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 12 Jun 2020 00:10:23 +0200 Subject: [PATCH] modify max ticket amount to render --- TouchyTickets/Ui.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TouchyTickets/Ui.cs b/TouchyTickets/Ui.cs index 3e4d523..ad20fe9 100644 --- a/TouchyTickets/Ui.cs +++ b/TouchyTickets/Ui.cs @@ -46,11 +46,13 @@ namespace TouchyTickets { var rainingTickets = new List(); var main = new Group(Anchor.TopLeft, Vector2.One, false) { OnUpdated = (e, time) => { + if (e.IsHidden) + return; for (var i = rainingTickets.Count - 1; i >= 0; i--) { if (rainingTickets[i].Update()) rainingTickets.RemoveAt(i); } - while (rainingTickets.Count < Math.Min(GameImpl.Instance.Map.TicketsPerSecond / 10, 200)) + while (rainingTickets.Count < Math.Min(GameImpl.Instance.Map.TicketsPerSecond / 20, 300)) rainingTickets.Add(new RainingTicket()); }, OnDrawn = (e, time, batch, alpha) => {