diff options
author | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 16:07:47 +0200 |
---|---|---|
committer | IcECreAm777 <31211782+IcECreAm777@users.noreply.github.com> | 2022-07-17 16:07:47 +0200 |
commit | 48d4f9de2536be2617aec3d58697a0db061d038c (patch) | |
tree | 0a6cea93fd383891223ade22196b76b6b46a885c /godot/scenes/Die.gd | |
parent | 55a6ea0d4e550af312e3d66799ac226623653b65 (diff) | |
download | 2022-48d4f9de2536be2617aec3d58697a0db061d038c.tar.gz 2022-48d4f9de2536be2617aec3d58697a0db061d038c.tar.bz2 2022-48d4f9de2536be2617aec3d58697a0db061d038c.zip |
level loading is supported now
Diffstat (limited to 'godot/scenes/Die.gd')
-rw-r--r-- | godot/scenes/Die.gd | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 3b3a5e7..c711cee 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -54,6 +54,9 @@ func _input(event): if _game.is_post_game(): if event is InputEventMouseButton || event is InputEventKey: _game.next_level() + translation.x = 0 + translation.y = 0 + translation.z = 0 return if event is InputEventKey: @@ -110,10 +113,10 @@ func _physics_process(delta): if dice_is_moving == true and angular_velocity.length() < 0.1 and linear_velocity.length() < 0.1: if curr_buff != buff.ball: dice_is_moving = false + revert_current_buff() if !after_stroke: return after_stroke = false - revert_current_buff() var last_buff = curr_buff curr_buff = get_buff_from_upwards_side() if last_buff == curr_buff && curr_buff == buff.stroke: @@ -195,6 +198,7 @@ func revert_current_buff(): buff.gravity: gravity_scale = default_gravity + func apply_buff(): gravity_scale = default_gravity match curr_buff: |