Update & fix C# blocks under getting_started/

- `_Process` take its delta argument as a double
- Node classes need to be partial
- Use `SignalName.*` instead of `nameof(*)` for signals
- Add a note about how `delta` arguments are doubles
This commit is contained in:
Paul Joannon
2023-01-14 11:11:52 +01:00
parent 93b6e0977b
commit 293c3455bb
4 changed files with 23 additions and 31 deletions

View File

@@ -487,7 +487,7 @@ this code to the function:
public void OnPlayerBodyEntered(PhysicsBody2D body)
{
Hide(); // Player disappears after being hit.
EmitSignal(nameof(Hit));
EmitSignal(SignalName.Hit);
// Must be deferred as we can't change physics properties on a physics callback.
GetNode<CollisionShape2D>("CollisionShape2D").SetDeferred("disabled", true);
}