modify max ticket amount to render

This commit is contained in:
Ellpeck 2020-06-12 00:10:23 +02:00
parent 9c7c64ccce
commit ede5fa2b58

View file

@ -46,11 +46,13 @@ namespace TouchyTickets {
var rainingTickets = new List<RainingTicket>();
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) => {