16 lines
269 B
C#
16 lines
269 B
C#
![]() |
using Godot;
|
||
|
using System;
|
||
|
|
||
|
public partial class QuitButton : Button
|
||
|
{
|
||
|
// Called when the node enters the scene tree for the first time.
|
||
|
public override void _Ready() {
|
||
|
Text = "Quit";
|
||
|
Pressed += OnPressed;
|
||
|
}
|
||
|
|
||
|
private void OnPressed() {
|
||
|
GetTree().Quit();
|
||
|
}
|
||
|
}
|