From a31cd9fb31eb5bcdd14ea9c41a3a5fd4ef350b1f Mon Sep 17 00:00:00 2001 From: Alan <alanjfogel@gmail.com> Date: Fri, 31 Jan 2025 14:15:22 -0600 Subject: [PATCH] added scaling up of sprites to make them fit the tiles better --- scripts/game.gd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/game.gd b/scripts/game.gd index 1c6eddc..5a3fdd2 100644 --- a/scripts/game.gd +++ b/scripts/game.gd @@ -133,6 +133,12 @@ func draw_pieces(): piece_instance.position = Vector2((x * tile_size) + tile_size/2, (y * tile_size) + tile_size/2) piece_instance.z_index = 3 + # Scale the sprite by 25% for all pieces except the king + if board[x][y] is King: + piece_instance.scale = Vector2(2.0, 2.0) # Scale the king by 50% + else: + piece_instance.scale = Vector2(1.25, 1.25) # Scale other pieces by 25% + # If piece is opponent, add a black shader to piece if board[x][y].is_white == false: var sprite = piece_instance.get_node("Sprite2D") as Sprite2D -- GitLab