diff --git a/Cannon.gd b/Cannon.gd index 4fd34bb..a5ac436 100644 --- a/Cannon.gd +++ b/Cannon.gd @@ -7,7 +7,7 @@ enum STATE {INACTIVE, RELOADING, SHOOTING} #------------Methods-------------# func _ready(): var root = get_tree().root.get_child(0) - root.timeout.connect("shooting",self,"_on_signal_shooting") + root.shooting.connect(_on_signal_shooting) maxStashValue = 1 currentStashValue = 0 currentState = STATE.INACTIVE diff --git a/cannon.tscn b/cannon.tscn new file mode 100644 index 0000000..4c528ea --- /dev/null +++ b/cannon.tscn @@ -0,0 +1,6 @@ +[gd_scene load_steps=2 format=3 uid="uid://d2g0of2prwwj4"] + +[ext_resource type="Script" path="res://Cannon.gd" id="1_mopo1"] + +[node name="Cannon" type="Node"] +script = ExtResource("1_mopo1")