Skip to content

Commit

Permalink
adjust sizechanger to work only within game new bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
katzerax authored Nov 7, 2024
1 parent 4cfa8eb commit 357f6a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/SizeChanger/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func _process(delta):
var size_changed = false

if Input.is_key_pressed(grow):
player.player_scale = clamp(player.player_scale + 0.4 * delta, 0.1, 100)
player.player_scale = clamp(player.player_scale + 0.4 * delta, 0.6, 1.4)
size_changed = true
elif Input.is_key_pressed(shrink):
player.player_scale = clamp(player.player_scale - 0.4 * delta, 0.1, 100)
player.player_scale = clamp(player.player_scale - 0.4 * delta, 0.6, 1.4)
size_changed = true
elif Input.is_key_pressed(reset):
player.player_scale = 1.0
Expand Down

0 comments on commit 357f6a0

Please sign in to comment.