예제 #1
0
 public override void Update(GameTime gameTime)
 {
     if (InputHandler.KeyPressed(Keys.Space) || InputHandler.KeyPressed(Keys.Enter))
     {
         GameRef.ContinueGame(isLeveled);
     }
     base.Update(gameTime);
 }
예제 #2
0
 public override void Update(GameTime gameTime)
 {
     base.Update(gameTime);
     populateLabels(new Vector2(10, 120));
     gold.Text = "Gold:  " + player.Money;
     ControlManager.Update(gameTime, playerIndexInControl);
     if (InputHandler.KeyPressed(Keys.Escape))
     {
         GameRef.ContinueGame(false);
     }
 }
예제 #3
0
 void LabelTen_Clear(object sender, EventArgs e)
 {
     player.ConsumablesList.RemoveAt(9);
     player.ConsumablesList.Insert(9, null);
     if (fromCombat)
     {
         GameRef.ContinueCombat();
     }
     else
     {
         GameRef.ContinueGame(false);
     }
 }
예제 #4
0
 void EquipNine_Clear(object sender, EventArgs e)
 {
     player.EquipList.RemoveAt(8);
     player.EquipList.Insert(8, null);
     if (fromCombat)
     {
         GameRef.ContinueCombat();
     }
     else
     {
         GameRef.ContinueGame(false);
     }
 }
예제 #5
0
 private void Run_Selected(object sender, EventArgs e)
 {
     Run.HasFocus = false;
     if (!textBox)
     {
         if (Player.Speed > Enemies[0].Speed && Player.Speed > Enemies[1].Speed)
         {
             GameRef.ContinueGame(false);
         }
         else
         {
             EnemyTurn();
         }
     }
 }
예제 #6
0
        public override void Update(GameTime gameTime)
        {
            if (player.ConsumablesList != null)
            {
                foreach (Item i in player.ConsumablesList)
                {
                    if (i != null)
                    {
                        if (ControlManager[ControlManager.selectedControl].Text.Equals(i.Name))
                        {
                            Desclabel.Text = i.Description;
                        }
                    }
                }
            }
            if (player.EquipList != null)
            {
                foreach (Item i in player.EquipList)
                {
                    if (i != null)
                    {
                        if (ControlManager[ControlManager.selectedControl].Text.Equals(i.Name) || ControlManager[ControlManager.selectedControl].Text.Equals(i.Name + "[E]"))
                        {
                            Desclabel.Text = i.Description;
                        }
                    }
                }
            }
            if (InputHandler.KeyPressed(Keys.I) || InputHandler.KeyPressed(Keys.Escape))
            {
                if (fromCombat)
                {
                    GameRef.ContinueCombat();
                }
                else
                {
                    GameRef.ContinueGame(false);
                }
            }
            Vector2 position = new Vector2(0, 0);

            populateConLabels(position);
            populateEquipLabels();

            ControlManager.Update(gameTime, playerIndexInControl);
            base.Update(gameTime);
        }
예제 #7
0
        public override void Update(GameTime gameTime)
        {
            ControlManager.Update(gameTime, playerIndexInControl);

            if (InputHandler.KeyPressed(Keys.Escape) || InputHandler.KeyPressed(Keys.C))
            {
                if (fromCombat)
                {
                    GameRef.ContinueCombat();
                }
                else
                {
                    GameRef.ContinueGame(false);
                }
            }
            base.Update(gameTime);
        }
예제 #8
0
        void LabelTen_Selected(object sender, EventArgs e)
        {
            Consumable c = (Consumable)player.ConsumablesList[9];

            if (c != null)
            {
                c.Use();
                player.ConsumablesList.RemoveAt(9);
                player.ConsumablesList.Insert(9, null);
                if (fromCombat)
                {
                    GameRef.ContinueCombat();
                }
                else
                {
                    GameRef.ContinueGame(false);
                }
            }
        }
예제 #9
0
        void LabelOne_Selected(object sender, EventArgs e)
        {
            Consumable c = (Consumable)player.ConsumablesList[0];

            if (c != null)
            {
                c.Use();
                player.ConsumablesList.RemoveAt(0);
                player.ConsumablesList.Insert(0, null);
                populateConLabels(Vector2.Zero);
                if (fromCombat)
                {
                    GameRef.ContinueCombat();
                }
                else
                {
                    GameRef.ContinueGame(false);
                }
            }
        }
예제 #10
0
 public void ContinueGame_Selected(object sender, EventArgs e)
 {
     GameRef.ContinueGame(false);
 }