Skip to content

Commit

Permalink
Remove extra signal connection and callback in signal start project
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanLovato committed Apr 6, 2021
1 parent 89046b7 commit 21f5c10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
9 changes: 4 additions & 5 deletions starter-projects/using-signals/CustomSignal/Player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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")
Expand All @@ -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"]
8 changes: 0 additions & 8 deletions starter-projects/using-signals/ToggleMotion/Godot.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 21f5c10

Please sign in to comment.