Ballz.Logic.LogicControl.StartGame C# (CSharp) Method

StartGame() public method

public StartGame ( GameSession settings, bool remoteControlled = false, int localPlayerId = -1 ) : void
settings GameSession
remoteControlled bool
localPlayerId int
return void
        public void StartGame(GameSession.Logic.GameSettings settings, bool remoteControlled = false, int localPlayerId = -1)
        {
            ButtonRepeat.Stop();
            ButtonDelay.Stop();
            // Go back to main menu so it will show when the user enters the menu later
            MenuGoBack();
            // Select the "Continue" entry
            activeMenu.Peek().SelectIndex(0);

            state = GameState.SimulationState;
            if (Game.Match != null)
                Game.Match.Dispose();

            Game.Match = settings.GameMode.StartSession(Game, settings, remoteControlled, localPlayerId);
            Game.Match.Start();
            RaiseMessageEvent(new LogicMessage(LogicMessage.MessageType.GameMessage));
        }