public void Update(GameTime gameTime, GraphicsDeviceManager graphics) { if (!Balls.Any()) { Balls.Add(new Ball(new Vector2(132, 132), new Vector2(0f, 0f), 0, BallTextures[0], Color.White)); Balls.Add(new Ball(new Vector2(232, 232), new Vector2(0f, 0f), 0, BallTextures[1], Color.White)); Balls.Add(new Ball(new Vector2(332, 332), new Vector2(0f, 0f), 0, BallTextures[2], Color.White)); } Bugs.ForEach(bug => { if (bug.ExpireTime != TimeSpan.MinValue && bug.ExpireTime <= gameTime.TotalGameTime) { Bugs.Remove(bug); } }); if (Bugs.Count < NumberOfSimultaneousBugs || InsanityMode) { Bugs.Add(new Bug(new Vector2(Utility.GetRandomInt(0, graphics.GraphicsDevice.Viewport.Width - BugTexture.Width), Utility.GetRandomInt(0, graphics.GraphicsDevice.Viewport.Height - BugTexture.Height)), BugTexture, BugSquishedTexture, Color.White)); } UpdateInput(); UpdatePositions(gameTime, graphics); }