diff --git a/2d/dodge_the_creeps/Player.gd b/2d/dodge_the_creeps/Player.gd index 2621907e..e2d3e87b 100644 --- a/2d/dodge_the_creeps/Player.gd +++ b/2d/dodge_the_creeps/Player.gd @@ -47,7 +47,7 @@ func start(pos): $CollisionShape2D.disabled = false -func _on_Player_body_entered(_body): +func _on_body_entered(_body): hide() # Player disappears after being hit. hit.emit() # Must be deferred as we can't change physics properties on a physics callback. diff --git a/2d/dodge_the_creeps/Player.tscn b/2d/dodge_the_creeps/Player.tscn index 742899db..86e7c1e3 100644 --- a/2d/dodge_the_creeps/Player.tscn +++ b/2d/dodge_the_creeps/Player.tscn @@ -72,4 +72,4 @@ process_material = SubResource("7") texture = ExtResource("2") speed_scale = 2.0 -[connection signal="body_entered" from="." to="." method="_on_Player_body_entered"] +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj b/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj index e4b73e2a..c8d6221d 100644 --- a/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj +++ b/mono/dodge_the_creeps/Dodge the Creeps with C#.csproj @@ -1,6 +1,13 @@ - + - net472 + net6.0 + true DodgeTheCreeps + + + + + + \ No newline at end of file diff --git a/mono/dodge_the_creeps/HUD.cs b/mono/dodge_the_creeps/HUD.cs index 3dea0859..005e3502 100644 --- a/mono/dodge_the_creeps/HUD.cs +++ b/mono/dodge_the_creeps/HUD.cs @@ -3,7 +3,7 @@ using Godot; public partial class HUD : CanvasLayer { [Signal] - public delegate void StartGame(); + public delegate void StartGameEventHandler(); public void ShowMessage(string text) { @@ -19,11 +19,10 @@ public partial class HUD : CanvasLayer ShowMessage("Game Over"); var messageTimer = GetNode("MessageTimer"); - await ToSignal(messageTimer, "timeout"); + await ToSignal(messageTimer, Timer.SignalName.Timeout); - var messageLabel = GetNode