aboutsummaryrefslogtreecommitdiffstats
path: root/godot/scenes/Die.gd
diff options
context:
space:
mode:
Diffstat (limited to 'godot/scenes/Die.gd')
-rw-r--r--godot/scenes/Die.gd15
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()