Free dagger when user click

This commit is contained in:
VAILLANT Jeremy
2021-05-10 15:56:43 +02:00
parent 1079950c65
commit 9011c2eff1
2 changed files with 21 additions and 4 deletions
+9 -3
View File
@@ -1,6 +1,12 @@
extends Spatial
signal clicked(dagger)
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
print("[Dagger#_ready]")
connect("clicked", self, "handle_piece_click")
func _on_Area_input_event(camera, event, click_position, click_normal, shape_idx):
print("[Dagger#_ready] You have clicked in dagger ...")
if event is InputEventMouseButton:
print("[Dagger#_ready] Click !! Click !!")
$dagger.free()