From 8e8a58bac339aa06e860b977670f16c8b4eb30a8 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Tue, 4 Oct 2022 22:29:47 +0200 Subject: scenes: reinstate credits and game start --- Scripts/Credits.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Scripts/Credits.cs') diff --git a/Scripts/Credits.cs b/Scripts/Credits.cs index 1955656..5432d02 100644 --- a/Scripts/Credits.cs +++ b/Scripts/Credits.cs @@ -2,14 +2,13 @@ using Godot; namespace Texty.Scripts { - public class Credits : Node + public partial class Credits : Node { - public override void _UnhandledKeyInput(InputEventKey @event) + public override void _UnhandledKeyInput(InputEvent @event) { - if (@event.Scancode == (uint)KeyList.Escape) + if (@event is InputEventKey { Keycode: Key.Escape }) { - var menu = ResourceLoader.Load("res://Scenes/Menus/MainMenu.tscn"); - GetTree().ChangeSceneTo(menu); + GetTree().ChangeSceneToFile("res://Scenes/Menus/MainMenu.tscn"); } } } -- cgit v1.2.3