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.gd10
1 files changed, 5 insertions, 5 deletions
diff --git a/godot/scenes/Die.gd b/godot/scenes/Die.gd
index 0d11d73..3b3a5e7 100644
--- a/godot/scenes/Die.gd
+++ b/godot/scenes/Die.gd
@@ -21,6 +21,7 @@ var mat
var target_bounce = 10
var default_gravity = 2
var default_bounciness = 0
+var after_stroke = false
var curr_buff = buff.none
@@ -83,6 +84,7 @@ func _input(event):
self.apply_torque_impulse(die_launch_force)
$PowerUI/PowerBar.hide()
_game.add_stroke()
+ after_stroke = true
#Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
# add one to counter
@@ -108,6 +110,9 @@ 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
+ if !after_stroke:
+ return
+ after_stroke = false
revert_current_buff()
var last_buff = curr_buff
curr_buff = get_buff_from_upwards_side()
@@ -119,11 +124,6 @@ func _physics_process(delta):
dice_is_moving = true
-# Called every frame. 'delta' is the elapsed time since the previous frame.
-#func _process(delta):
-# pass
-
-
"""
BUFFS
"""