/// <summary>
        /// Draw the map
        /// </summary>
        /// <param name="gameTime"></param>
        protected override void Draw(GameTime gameTime)
        {
            map.Draw(gameTime, Renderer);

            // draws the present context of the renderer to the window
            Renderer.RenderPresent();
        }
Beispiel #2
0
        public override void Update(SharpDL.GameTime gameTime)
        {
            buttonHeader.Update(gameTime);

            if (!IsActive)
            {
                return;
            }
            base.Update(gameTime);

            foreach (var control in controls)
            {
                control.Update(gameTime);
            }
        }
 /// <summary>
 /// Draws the tile to the passed renderer if the tile is not empty. The draw will occur at the center of the tile's texture.
 /// </summary>
 /// <param name="gameTime"></param>
 /// <param name="renderer"></param>
 public void Draw(GameTime gameTime, Renderer renderer)
 {
     foreach (var tileLayer in TileLayers)
     {
         foreach (var tile in tileLayer.Tiles)
         {
             tile.Draw(gameTime, renderer);
         }
     }
 }
Beispiel #4
0
        /// <summary>
        /// Draws the tile to the passed renderer if the tile is not empty. The draw will occur at the center of the tile's texture.
        /// </summary>
        /// <param name="gameTime"></param>
        /// <param name="renderer"></param>
        public void Draw(GameTime gameTime, Renderer renderer)
        {
            if (IsEmpty) return;

            Texture.Draw(
                GridPosition.X * Width,
                GridPosition.Y * Height,
                SourceTextureBounds);
        }
Beispiel #5
0
 /// <summary>
 /// Update the state of the game.
 /// </summary>
 /// <param name="gameTime"></param>
 protected override void Update(GameTime gameTime)
 {
     base.Update(gameTime);
 }
Beispiel #6
0
 /// <summary>
 /// Render the current state of the game.
 /// </summary>
 /// <param name="gameTime"></param>
 protected override void Draw(GameTime gameTime)
 {
     base.Draw(gameTime);
     Renderer.RenderPresent();
 }