Free dagger when user click
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user