From 21f5c1070b4fe76c7f65c042ef91e012217ac516 Mon Sep 17 00:00:00 2001 From: Nathan Lovato Date: Tue, 6 Apr 2021 17:21:35 -0600 Subject: [PATCH] Remove extra signal connection and callback in signal start project --- starter-projects/using-signals/CustomSignal/Player.tscn | 9 ++++----- starter-projects/using-signals/ToggleMotion/Godot.gd | 8 -------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/starter-projects/using-signals/CustomSignal/Player.tscn b/starter-projects/using-signals/CustomSignal/Player.tscn index 772d3f8..4d11316 100644 --- a/starter-projects/using-signals/CustomSignal/Player.tscn +++ b/starter-projects/using-signals/CustomSignal/Player.tscn @@ -6,7 +6,7 @@ [sub_resource type="CircleShape2D" id=1] radius = 26.0512 -[sub_resource type="Animation" id=3] +[sub_resource type="Animation" id=2] resource_name = "setup" length = 0.001 tracks/0/type = "value" @@ -22,8 +22,7 @@ tracks/0/keys = { "values": [ Color( 1, 1, 1, 1 ) ] } -[sub_resource type="Animation" id=2] -resource_name = "take_damage" +[sub_resource type="Animation" id=3] length = 0.4 tracks/0/type = "value" tracks/0/path = NodePath("Sprite:modulate") @@ -49,7 +48,7 @@ shape = SubResource( 1 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "setup" -anims/setup = SubResource( 3 ) -anims/take_damage = SubResource( 2 ) +anims/setup = SubResource( 2 ) +anims/take_damage = SubResource( 3 ) [connection signal="area_entered" from="." to="." method="_on_area_entered"] diff --git a/starter-projects/using-signals/ToggleMotion/Godot.gd b/starter-projects/using-signals/ToggleMotion/Godot.gd index fd1b96d..5b5511d 100644 --- a/starter-projects/using-signals/ToggleMotion/Godot.gd +++ b/starter-projects/using-signals/ToggleMotion/Godot.gd @@ -8,11 +8,3 @@ func _process(delta): rotation += angular_speed * delta var velocity = Vector2.UP.rotated(rotation) * speed position += velocity * delta - - -func _on_Button_pressed(): - set_process(not is_processing()) - - -func _on_Timer_timeout(): - visible = not visible