public override void Update(GameTime gt, MinigameScreen parentScreen) { Last = gt; if (!sTimer) { sTimer = true; GameTimer.AddStaticTimer(gt, new TimeSpan(0, 0, 0, 0, GlobalRandom.random.Next(MAX_TIME - MIN_TIME) + MIN_TIME), SpawnReset); } if (enableControl) { sandwich.Update(Player1, fallingItems); } foreach (LunchItem item in fallingItems) { item.Update(sandwich); } fallingItems.RemoveAll(x => !x.isFalling || x.RealPosition.Y > Settings.GP_Y); if (!enableControl) { return; } // do Spider Spawn foreach (Player p in Players) { if (!p.isP1 && p.GamePad.IsButtonDown(ControllerButton.A)) { if (fallingItems.Any(x => x is Spider && ((Spider)x).owner == p)) { // Already a spider falling. Wait } else { fallingItems.Add(new Spider(Spider, this, new Vector2(p.GamePad.LeftStick().X *Settings.GP_X, -LunchItem.Height), p)); } } } victorytimer.Update(gt); }
public static void Load(ContentManager cm) { MainMenu.Load(); MinigameScreen.Load(cm); SetupScreen.Load(); }
/// <summary> /// /// </summary> public abstract void Update(GameTime gt, MinigameScreen parentScreen);