protected override void Update(GameTime gameTime)
{
    newState = Keyboard.GetState();
    newPadState = GamePad.GetState(PlayerIndex.One);

    if (inDialog && dialogNPC != null)
    {
        dialog.Show();
        dialogNPC.StartDialog(dialogNPC.DialogName);
        dialogNPC = null;
    }

    if (!dialog.Enabled)
    {
        inDialog = false;
        dialogNPC = null;
    }

    if (activeScreen == startScreen)
    {
        HandleStartScreenInput();
    }
    else if (activeScreen == helpScreen)
    {
        HandleHelpScreenInput();
    }
    else if (activeScreen == createPCScreen)
    {
        HandleCreatePCScreenInput();
    }
    else if (activeScreen == quitPopUpScreen)
    {
        HandleQuitPopUpScreenInput();
    }
    else if (activeScreen == genderPopUpScreen)
    {
        HandleGenderPopUpScreenInput();
    }
    else if (activeScreen == classPopUpScreen)
    {
        HandleClassPopUpScreenInput();
    }
    else if (activeScreen == difficultyPopUpScreen)
    {
        HandleDifficultyPopUpScreenInput();
    }
    else if (activeScreen == nameInputScreen)
    {
        HandleNameInputScreenInput();
    }
    else if (activeScreen == introScreen)
    {
        HandleIntroScreenInput();
    }
    else if (activeScreen == creditScreen)
    {
        HandleCreditScreenInput();
    }
    else if (activeScreen == actionScreen)
    {
        HandleActionScreeenInput();
        HandlePlayerInput(gameTime);
    }
    else if (activeScreen == viewCharacterScreen)
    {
        HandleViewCharacterScreenInput();
    }
    else if (activeScreen == quitActionScreen)
    {
        HandleQuitActionScreenInput();
    }
    else if (activeScreen == combatScreen)
    {
        HandleCombatScreenInput();
    }
    else if (activeScreen == treasureScreen)
    {
        HandleTreasureScreenInput();
    }
    base.Update(gameTime);

    oldState = newState;
    oldPadState = newPadState;
}

image

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s