From c31369c0d0d13cec7bb23f087d28ac20ed81db57 Mon Sep 17 00:00:00 2001 From: Inspiaaa Date: Thu, 5 Sep 2024 15:39:13 +0200 Subject: [PATCH] Add pause feature to demo --- demo/IconSpawner.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/demo/IconSpawner.cs b/demo/IconSpawner.cs index 8013ab0..1b33c10 100644 --- a/demo/IconSpawner.cs +++ b/demo/IconSpawner.cs @@ -17,4 +17,18 @@ public override void _Input(InputEvent e) } } } + + public override void _Ready() + { + ProcessMode = ProcessModeEnum.Always; + } + + public override void _Process(double delta) + { + if (Input.IsActionJustPressed("ui_select")) + { + GetTree().Paused = !GetTree().Paused; + GD.Print("Pause = ", GetTree().Paused); + } + } }