money
This commit is contained in:
parent
4dfeed7b4a
commit
09fe3834ad
12 changed files with 433 additions and 5 deletions
|
@ -1,7 +1,15 @@
|
|||
extends RigidBody2D
|
||||
|
||||
@export var Particles: PackedScene
|
||||
|
||||
func _on_body_entered(body: Node) -> void:
|
||||
print("aaa")
|
||||
if abs(linear_velocity.x) > 200 or abs(linear_velocity.y) > 200:
|
||||
%AudioStreamPlayer.play()
|
||||
|
||||
func _on_area_2d_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
|
||||
if event.pressed:
|
||||
var particles = Particles.instantiate()
|
||||
particles.global_position = global_position
|
||||
get_parent().add_child(particles)
|
||||
queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue