예제 #1
1
        public Game(MultiplayerMode mode)
        {
            s_current = this;

            m_multiplayerMode = mode;
            m_field = new Field(this);

            m_roundIndex = 0;
            m_totalRounds = CVars.roundsToWin.intValue;

            RegisterNotification(Notifications.ConsoleVariableChanged, ConsoleVariableChanged);
        }
        protected override void OnStart()
        {
            base.OnStart();

            game = new Game(MultiplayerMode.None);

            GameSettings.InputEntry[] entries = settings.inputEntries;
            for (int i = 0; i < entries.Length; ++i)
            {
                Player player = new Player(entries[i].playerIndex);
                player.SetPlayerInput(entries[i].input);
                game.AddPlayer(player);
            }

            LoadField(settings.scheme);

            gameScreen = new GameScreen();

            StartScreen(gameScreen);

            GetConsole().TryExecuteCommand("exec game.cfg");
        }