1234567891011121314151617181920212223242526 |
- class_name Ball
- extends RigidBody2D
- signal kace_contact
- const brick_layer = 2
- const interrupt_speed = 500
- func go_down_unstopped():
- linear_velocity.y = interrupt_speed
- linear_velocity = linear_velocity.normalized() * interrupt_speed
- set_collision_mask_bit(brick_layer, false)
- func _integrate_forces(state : Physics2DDirectBodyState):
- for i in range(state.get_contact_count()):
- var contact_pos = state.get_contact_local_position(i)
- emit_signal("kace_contact", contact_pos)
- func _on_Launcher_interrupt_wave():
- go_down_unstopped()
|