Exemple #1
0
        public override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(background, rectangleScreen, Color.White);
            combat.Draw(spriteBatch);
            playerBar.Draw(spriteBatch, new Vector2(combat.characterPos.X, combat.characterPos.Y - 50), combat.playerCurrentHealth, combat.CombatPlayer.Abilities.Health);
            enemyBar.Draw(spriteBatch, new Vector2(combat.enemyPos.X, combat.enemyPos.Y - 50), combat.enemyCurrentHealth, combat.CombatEnemy.Health);
            spriteBatch.DrawString(font, combat.CombatPlayer.Name, new Vector2(30, 30), Color.Gold);
            spriteBatch.DrawString(font, combat.CombatEnemy.Name, new Vector2(500, 30), Color.Red);
            DrawEnemyStats();
            spriteBatch.DrawString(font2, Result, new Vector2(ResultPostion.X, ResultPostion.Y), Color.Red);
            spriteBatch.End();

            base.Draw(gameTime);
        }
Exemple #2
0
        public override void Draw(GameTime gameTime)
        {
            //end previous spritebatch and draw new one

            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, camera.Transform);
            //draw map..
            map.Draw(spriteBatch);

            RAJ.Draw(spriteBatch);

            //draw gameobjects..
            foreach (gameObject objects in gameObjs)
            {
                objects.Draw(spriteBatch);
            }

            if (player.inDialog == true)
            {
                spriteBatch.DrawString(gameFont, dialogueText, new Vector2(20, 540), Color.Red);
            }

            //draw monsters..

            foreach (Enemy enemy in enemies)
            {
                enemy.Draw(spriteBatch);
            }



            //draw character..
            characterSprite.Draw(spriteBatch);
            map.DrawLayer2(spriteBatch);



            spriteBatch.DrawString(gameFont, playerPos().ToString(), new Vector2((int)characterSprite.Position.X, (int)characterSprite.Size.Bottom + 10), Color.White);
            statBar.Draw(spriteBatch, characterSprite.Size, characterSprite.Position, currentHealth, player.Abilities.Health);
            DrawText();


            spriteBatch.End();
            base.Draw(gameTime);
        }