Exemplo n.º 1
0
        public Launcher()
        {
            GameSaverAndLoader.loadMeta(0);
            InitializeComponent();
            setUpBasedOnSaveSlot(0);


            game    = new Game1();
            content = new ContentManager(Game1.instance.Content.ServiceProvider, Game1.instance.Content.RootDirectory);

            testSoundAmbient              = content.Load <SoundEffect>("Sounds/Ambiance/none-1");
            soundAmbientInstance          = testSoundAmbient.CreateInstance();
            soundAmbientInstance.IsLooped = true;

            testSoundMonster              = content.Load <SoundEffect>("Sounds/Wav/Gun_0");
            soundMonsterInstance          = testSoundMonster.CreateInstance();
            soundMonsterInstance.IsLooped = true;

            testSoundMusic              = content.Load <SoundEffect>("Sounds/Music/song1_journey_0");
            soundMusicInstance          = testSoundMusic.CreateInstance();
            soundMusicInstance.IsLooped = true;


            toolTip.SetToolTip(start_game_button, "Start the game with the current settings.");
            toolTip.SetToolTip(trackbar_sound_monster, "Sets the volume for the player, monsters, UI, etc.");
            toolTip.SetToolTip(trackbar_sound_ambient, "Sets the volume for the background noise.");
            toolTip.SetToolTip(trackbar_sound_music, "Sets the volume for the music.");
            toolTip.SetToolTip(button_audio_test, "Starts or stops audio so that you can adjust volume levels by ear.");
            toolTip.SetToolTip(difficulty_hard, "Turns off adaptive difficulty. The game will no longer get harder as you get better.");
            toolTip.SetToolTip(difficulty_very_hard, "Turns on adaptive difficulty. The game will will try to match its difficulty to your skill level.");

            playing_audio = false;
            this.saveSlot.SelectedIndex = 0;
        }
Exemplo n.º 2
0
        public void setUpBasedOnSaveSlot(int slot)
        {
            Console.WriteLine("slot " + slot);
            GameSaverAndLoader.loadMeta(Game1.selectedSaveSlot);
            this.screenWBox.Text = MetaData.screenW + "";
            this.screenHBox.Text = MetaData.screenH + "";
            this.fullscreenOptionsBox.SelectedIndex = MetaData.screenSetting;
            this.trackbar_sound_ambient.Value       = (int)(MetaData.audioSettingAmbient * 100);
            this.trackbar_sound_monster.Value       = (int)(MetaData.audioSettingMonster * 100);
            this.trackbar_sound_music.Value         = (int)(MetaData.audioSettingMusic * 100);


            if (MetaData.adaptiveDifficulty == 1)
            {
                difficulty_very_hard.Checked = true;
            }
            else
            {
                difficulty_hard.Checked = true;
            }
        }