Skip to content
Snippets Groups Projects
Commit a31cd9fb authored by Alan's avatar Alan
Browse files

added scaling up of sprites to make them fit the tiles better

parent b24b286b
No related branches found
No related tags found
1 merge request!1Refactoring game.gd to split up move validation to individual pieces, added...
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment