Exemplo n.º 1
0
        public override void Update(GameTime gameTime)
        {
            flash.Update(gameTime);
            if (Game.InputHandler.Focused is DialogScreen)
            {
                return;
            }

            if (Player.Party.Count == 0)
            {
                ChoiceScreen.Show("You died!", new Choice("Yeah Whatever...", Escaped));
                return;
            }

            if (enemies.Count == 0)
            {
                ChoiceScreen.Show("You won!", new Choice("Yeah Whatever...", Escaped));
                return;
            }

            if (!waiting)
            {
                switch (State)
                {
                case BattleState.NOTIF:
                    if (setupIndex < Player.Party.Count)
                    {
                        MessageScreen.Show("Select Location for " + Player.Party[setupIndex].Name);
                        for (int row = 0; row < tileEngine.MapGraphics.GetLength(0); row++)
                        {
                            for (int col = 0; col < ALLOWED_INITIAL_REGION; col++)
                            {
                                tileEngine.MapGraphics[row, col].Color = Color.Yellow;
                            }
                        }
                        colorChanged = true;
                        State        = BattleState.SETUP;
                    }
                    else
                    {
                        if (colorChanged)
                        {
                            for (int row = 0; row < tileEngine.MapGraphics.GetLength(0); row++)
                            {
                                for (int col = 0; col < tileEngine.MapGraphics.GetLength(1); col++)
                                {
                                    tileEngine.MapGraphics[row, col].Color = Color.White;
                                }
                            }
                            colorChanged = false;
                        }
                        ChoiceScreen.Show("What to do?",
                                          new Choice("Fight", Fight),
                                          new Choice("End Turn",
                                                     delegate
                        {
                            foreach (Character c in Player.Party)
                            {
                                c.CurrMovementPoints = c.MaxMovementPoints;
                            }
                            State = BattleState.ENEMY_TURN;
                            return(null);
                        }),
                                          new Choice("Run", ExitSequence));
                    }
                    break;
                }
            }

            cursor.Update(gameTime);
        }
Exemplo n.º 2
0
 public override void Update(GameTime gameTime)
 {
     background.Update(gameTime);
 }
Exemplo n.º 3
0
 public override void Update(GameTime gameTime)
 {
     background.Update(gameTime);
     cursor.Color = background.Color;
 }
Exemplo n.º 4
0
 public override void Update(GameTime gameTime)
 {
     newGameButtonBase.Update(gameTime);
     quitGameButtonBase.Update(gameTime);
     background.Update(gameTime);
 }