Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Go Save The King
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Htoo Aung (kha451)
Go Save The King
Commits
a31cd9fb
Commit
a31cd9fb
authored
1 month ago
by
Alan
Browse files
Options
Downloads
Patches
Plain Diff
added scaling up of sprites to make them fit the tiles better
parent
b24b286b
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
Refactoring game.gd to split up move validation to individual pieces, added...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/game.gd
+6
-0
6 additions, 0 deletions
scripts/game.gd
with
6 additions
and
0 deletions
scripts/game.gd
+
6
−
0
View file @
a31cd9fb
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment