Exemplo n.º 1
0
 public void Update(GameTime gameTime)
 {
     if (currentGameState != null)
     {
         currentGameState.Update(gameTime);
     }
 }
Exemplo n.º 2
0
    public override void Update(GameTime gameTime)
    {
        titleMenuState.Update(gameTime);

        //Update positions
        options.Position           = scroll.Position + new Vector2(150, 50);
        musicSlider.Position       = scroll.Position + new Vector2(150, 150);
        soundEffectSlider.Position = scroll.Position + new Vector2(150, 250);
        voiceOverSlider.Position   = scroll.Position + new Vector2(150, 350);
        fullscreen.Position        = scroll.Position + new Vector2(150, 450);
        vsync.Position             = scroll.Position + new Vector2(150, 570);
        resolution.Position        = scroll.Position + new Vector2(150, 690);
        apply.Position             = scroll.Position + new Vector2(850, 750);

        //Update volume settings
        GameSettings.MusicVolume = musicSlider.Value;
        GameSettings.SoundVolume = soundEffectSlider.Value;
        GameSettings.VoiceVolume = voiceOverSlider.Value;

        GameSettings.ChangeVolume();

        //Update checkboxes
        GameSettings.Fullscreen = fullscreen.Check;
        GameSettings.VSync      = vsync.Check;

        //Update dropMenu
        switch (resolution.Options[0].Text)
        {
        case "1920px X 1080px":
            GameSettings.Resolution = new Point(1920, 1080);
            break;

        case "1600px X 900px":
            GameSettings.Resolution = new Point(1600, 900);
            break;

        case "1280px X 720px":
            GameSettings.Resolution = new Point(1280, 720);
            break;

        case "640px X 360px":
            GameSettings.Resolution = new Point(640, 360);
            break;

        default:
            break;
        }

        settings.Update(gameTime);
    }
Exemplo n.º 3
0
 public override void Update(GameTime gameTime)
 {
     playingState.Update(gameTime);
 }
Exemplo n.º 4
0
 public override void Update(GameTime gameTime)
 {
     playingState.Update(gameTime);
     score.Text = "Score: " + Score;
 }
Exemplo n.º 5
0
 public void Update(GameTime gameTime)
 {
     playingState.Update(gameTime);
     hud.Update(gameTime);
 }