Beispiel #1
0
 protected void DrawValidAttackTiles()
 {
     foreach (Point point in Cursor.selectedUnit.validAttackPoints)
     {
         this.spriteBatch.Draw(attackTileAnimated.GetTexture(), new Vector2(point.X * Level.tileSize.X, point.Y * Level.tileSize.Y + HUD.offset * WindowScale.Y), null, attackTileAnimated.GetFrameRect(), scale: WindowScale);
     }
 }
Beispiel #2
0
 protected void DrawValidMoveTiles()
 {
     foreach (Point point in cursor.validMoveTiles)
     {
         if (GetUnit(point) == null)
         {
             this.spriteBatch.Draw(moveTileAnimated.GetTexture(), new Vector2(point.X * Level.tileSize.X, point.Y * Level.tileSize.Y + HUD.offset * WindowScale.Y), null, moveTileAnimated.GetFrameRect(), scale: WindowScale);
         }
     }
 }
Beispiel #3
0
 public void Draw(SpriteBatch spriteBatch)
 {
     foreach (Tile tile in grid)
     {
         if (tile.animated)
         {
             AnimatedTileSet animatedTileSet = (AnimatedTileSet)palette[tile.tilesetIndex];
             AnimatedTexture animatedTexture = animatedTileSet.animatedTexture;
             spriteBatch.Draw(animatedTexture.GetTexture(), tile.position, null, animatedTexture.GetFrameRect(), null, 0, Game1.WindowScale, null, SpriteEffects.None, 0);
         }
         else
         {
             spriteBatch.Draw(tile.texture, tile.position, null, tile.rect, null, 0, Game1.WindowScale, Color.White, SpriteEffects.None, 0);
         }
     }
 }
Beispiel #4
0
        public void Draw(SpriteBatch spriteBatch)
        {
            if (currentContext == mapContext)
            {
                Vector2 drawPos = new Vector2(position.X * Level.tileSize.X, position.Y * Level.tileSize.Y + HUD.offset * Game1.WindowScale.Y);

                if (InMoveUnitMode)
                {
                    spriteBatch.Draw(moveArrowTexture, drawPos, null, new Rectangle(64, 0, 64, 64), null, 0, Game1.WindowScale, null, SpriteEffects.None, 0);
                }
                else if (mapCursorMode == MapCursorMode.AttackUnit)
                {
                    spriteBatch.Draw(moveArrowTexture, drawPos, null, new Rectangle(64, 64, 64, 64), null, 0, Game1.WindowScale, null, SpriteEffects.None, 0);
                }
                else
                {
                    spriteBatch.Draw(texture.GetTexture(), drawPos, null, texture.GetFrameRect(), scale: Game1.WindowScale);
                }
            }
        }
Beispiel #5
0
 public override OGLTexture GetCurrentTexture()
 {
     return(atexture.GetTexture());
 }