|
@@ -1,6 +1,8 @@
|
|
|
class_name Ball
|
|
|
extends RigidBody2D
|
|
|
|
|
|
+export (Color) var interrupt_color = Color.white
|
|
|
+
|
|
|
|
|
|
signal kace_contact
|
|
|
|
|
@@ -10,6 +12,11 @@ const interrupt_speed = 700
|
|
|
const contact_corrector = 3.0
|
|
|
|
|
|
|
|
|
+func interrupt_ball():
|
|
|
+ modulate = interrupt_color
|
|
|
+ go_down_unstopped()
|
|
|
+
|
|
|
+
|
|
|
func go_down_unstopped():
|
|
|
linear_velocity.y = interrupt_speed
|
|
|
linear_velocity = linear_velocity.normalized() * interrupt_speed
|
|
@@ -25,5 +32,5 @@ func _integrate_forces(state : Physics2DDirectBodyState):
|
|
|
|
|
|
|
|
|
func _on_Launcher_interrupt_wave():
|
|
|
- go_down_unstopped()
|
|
|
+ interrupt_ball()
|
|
|
|