Ejemplo n.º 1
0
        public override void DrawAbove(GameContext context)
        {
            XnaGraphics xna = new XnaGraphics(context);

            xna.DrawStringCentered(context.ScreenBounds.Width / 2, 50, "Tychaia", "TitleFont");

            // TODO: Draw animation of player falling here.
            xna.DrawSprite(
                context.ScreenBounds.Width / 2,
                context.ScreenBounds.Height / 2,
                "chars.player.player");

            MouseState state = Mouse.GetState();

            foreach (TitleButton b in this.m_Buttons)
            {
                b.Process(xna, state);
            }

            /*xna.DrawStringCentered(
             *  context.ScreenBounds.Width / 2,
             *  context.ScreenBounds.Height - 50,
             *  "Using static seed: " + m_StaticSeed.ToString(),
             *  "Arial");*/

            // Draw debug information.
            //DebugTracker.Draw(context, null);
        }
Ejemplo n.º 2
0
        public override void Draw(World world, XnaGraphics graphics)
        {
            base.Draw(world, graphics);

            if (this.Width == 16 && this.CurrentHealth > 0 && this.MaxHealth > 0)
            {
                graphics.DrawSprite((int)this.X, (int)this.Y, this.Width, this.Height, "meters.health.i" + ((int)(16 - (this.CurrentHealth / this.MaxHealth * 15))).ToString(), Color.White, false);
            }

            // You can override to show more meters in subclasses.
        }
Ejemplo n.º 3
0
        public override void DrawAbove(GameContext context)
        {
            XnaGraphics xna = new XnaGraphics(context);

            xna.DrawStringLeft(8, 8, "FPS: " + context.FPS, "Arial");

            // Draw UI.
            xna.DrawSprite(context.Camera.Width / 2 - xna.SpriteWidth("ui.frame") / 2,
                           context.Camera.Height - xna.SpriteHeight("ui.frame"),
                           "ui.frame");

            // Draw debug information.
            DebugTracker.Draw(context, this);
        }
Ejemplo n.º 4
0
 public override void Draw(World world, XnaGraphics graphics)
 {
     graphics.DrawSprite(
         (int)this.X,
         (int)this.Y,
         (int)(TileIsometricifier.TILE_TOP_WIDTH * 2.0 / this.m_Distance),
         (int)(TileIsometricifier.TILE_TOP_HEIGHT * 2.0 / this.m_Distance),
         "tiles.grass.isometric.top",
         new Color(1.0f, 1.0f, 1.0f, 1.0f - (m_Distance / 100.0f)));
     graphics.DrawSprite(
         (int)this.X + (int)(TileIsometricifier.TILE_SIDE_WIDTH * 2.0 / this.m_Distance),
         (int)this.Y + (int)(TileIsometricifier.TILE_TOP_HEIGHT / this.m_Distance),
         (int)(TileIsometricifier.TILE_SIDE_WIDTH * 2.0 / this.m_Distance),
         (int)(TileIsometricifier.TILE_SIDE_HEIGHT * 2.0 / this.m_Distance),
         "tiles.sand.isometric.sideL",
         new Color(1.0f, 1.0f, 1.0f, 1.0f - (m_Distance / 100.0f)));
     graphics.DrawSprite(
         (int)this.X,
         (int)this.Y + (int)(TileIsometricifier.TILE_TOP_HEIGHT / this.m_Distance),
         (int)(TileIsometricifier.TILE_SIDE_WIDTH * 2.0 / this.m_Distance),
         (int)(TileIsometricifier.TILE_SIDE_HEIGHT * 2.0 / this.m_Distance),
         "tiles.sand.isometric.sideR",
         new Color(1.0f, 1.0f, 1.0f, 1.0f - (m_Distance / 100.0f)));
 }