diff options
author | David <david003@gmx.net> | 2022-07-17 15:33:45 +0200 |
---|---|---|
committer | David <david003@gmx.net> | 2022-07-17 15:33:45 +0200 |
commit | 7c9aec177476c7aaa45b98ace88433caa1e80006 (patch) | |
tree | 5aede1787709ad7c6f05198d8080a2dc1142bb14 /godot/scenes/Die.gd | |
parent | 226e2c15490a3aedde6fa244b4ff48fc1eddb4da (diff) | |
download | 2022-7c9aec177476c7aaa45b98ace88433caa1e80006.tar.gz 2022-7c9aec177476c7aaa45b98ace88433caa1e80006.tar.bz2 2022-7c9aec177476c7aaa45b98ace88433caa1e80006.zip |
change phase to low gravity
Diffstat (limited to 'godot/scenes/Die.gd')
-rw-r--r-- | godot/scenes/Die.gd | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd index 3591cba..121f27d 100644 --- a/godot/scenes/Die.gd +++ b/godot/scenes/Die.gd @@ -139,9 +139,8 @@ func _physics_process(delta): revert_current_buff() var last_buff = curr_buff curr_buff = get_buff_from_upwards_side() - if last_buff == curr_buff && curr_buff == buff.stroke: - return - apply_buff() + if not(last_buff == curr_buff && curr_buff == buff.stroke): + apply_buff() # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -198,13 +197,16 @@ func get_buff_from_upwards_side(): if $Bounce1.get_overlapping_areas().size() > 0 || $Bounce2.get_overlapping_areas().size() > 0: return buff.bounce if $Phase1.get_overlapping_areas().size() > 0 || $Phase2.get_overlapping_areas().size() > 0: - return buff.phase + return buff.gravity return buff.none func low_gravity(): - gravity_scale = 0.2 + gravity_scale = 0.3 * default_gravity + +func low_gravity_revert(): + gravity_scale = default_gravity func extra_stroke(): _game.revoke_stroke() @@ -249,10 +251,9 @@ func revert_current_buff(): buff.phase: phase_revert() buff.gravity: - gravity_scale = default_gravity + low_gravity_revert() func apply_buff(): - gravity_scale = default_gravity match curr_buff: buff.ball: ball() |