コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: Screen.cs プロジェクト: Jeffersah/FP1
 public static void Load(ContentManager cm)
 {
     MainMenu.Load();
     MinigameScreen.Load(cm);
     SetupScreen.Load();
 }
コード例 #3
0
ファイル: Minigame.cs プロジェクト: Jeffersah/FP1
 /// <summary>
 ///
 /// </summary>
 public abstract void Update(GameTime gt, MinigameScreen parentScreen);