Exemplo n.º 1
0
        public GameForm(Engine.Objects.World world, Player startingPlayer)
        {
            world.ThrowIfNull("world");
            startingPlayer.ThrowIfNull("startingPlayer");

            _world            = world;
            _startingPlayer   = startingPlayer;
            _multimediaPlayer = new MultimediaPlayer(_volumeConfigurationSection);

            InitializeComponent();
            SetNormalViewSize();

            fpsToolStripMenuItem.Checked          = _fpsConfigurationSection.Visible;
            logToolStripMenuItem.Checked          = _logConfigurationSection.Visible;
            worldTimeToolStripMenuItem.Checked    = _worldTimeConfigurationSection.Visible;
            soundEffectsToolStripMenuItem.Checked = true;
            musicToolStripMenuItem.Checked        = true;
        }
        public TextAdventureGame(
            GraphicsDevice graphicsDevice,
            Engine.Objects.World world,
            Player player,
            IMultimediaPlayer multimediaPlayer,
            IFpsConfiguration fpsConfiguration,
            ILogConfiguration logConfiguration,
            IWorldTimeConfiguration worldTimeConfiguration)
            : base(graphicsDevice, new ContentDirectoryContentManagerProvider())
        {
            world.ThrowIfNull("world");
            player.ThrowIfNull("player");
            multimediaPlayer.ThrowIfNull("multimediaPlayer");
            fpsConfiguration.ThrowIfNull("fpsConfiguration");
            logConfiguration.ThrowIfNull("logConfiguration");
            worldTimeConfiguration.ThrowIfNull("worldTimeConfiguration");

            _world                  = world;
            _player                 = player;
            _multimediaPlayer       = multimediaPlayer;
            _fpsConfiguration       = fpsConfiguration;
            _logConfiguration       = logConfiguration;
            _worldTimeConfiguration = worldTimeConfiguration;
        }