add missing brackets in c sharp code

This commit is contained in:
Hana - Piralein
2025-07-14 20:29:57 +02:00
parent c47dfbd95f
commit cd3e94b4a1
8 changed files with 40 additions and 0 deletions
@@ -32,7 +32,9 @@ Handling the notification is done as follows (on any node):
public override void _Notification(int what)
{
if (what == NotificationWMCloseRequest)
{
GetTree().Quit(); // default behavior
}
}
It is important to note that by default, Godot apps have the built-in
+4
View File
@@ -27,8 +27,12 @@ Here is a quick example, closing your game if the escape key is hit:
public override void _UnhandledInput(InputEvent @event)
{
if (@event is InputEventKey eventKey)
{
if (eventKey.Pressed && eventKey.Keycode == Key.Escape)
{
GetTree().Quit();
}
}
}
However, it is cleaner and more flexible to use the provided :ref:`InputMap <class_InputMap>` feature,