Exemplo n.º 1
0
        private void StartIfReady()
        {
            if (!IsTransitioning)
            {
                if (players.Count > 0 && players.TrueForAll(t => t.CurrentState == JoinState.State.Ready))
                {
                    if (this.Game.CurrentGameMode.PlayerMode == PlayerMode.TwoVsTwo && !Debugger.IsAttached)
                    {
                        if (players.Count(t => t.CurrentState == JoinState.State.Ready) < 4)
                        {
                            return;
                        }
                    }

#if DEBUG
                    if (InputFunctions.DebugModifierIsOn(Keyboard.GetState()))
                    {
                        this.TransitionOutAndSwitchScene(new EndlessGameScene(this.Game));
                    }
                    else
#endif
                    if (this.Game.CurrentGameMode.GameMode == GameMode.BigHerd)
                    {
                        this.TransitionOutAndSwitchScene(new BasicGameScene(this.Game));
                    }
                    else if (this.Game.CurrentGameMode.GameMode == GameMode.Waves)
                    {
                        this.TransitionOutAndSwitchScene(new RightToLeftGameScene(this.Game));
                    }
                }
            }
        }