From 2f3abbb6f1141f15ef77ac27e431bc66bb0c7899 Mon Sep 17 00:00:00 2001 From: Sophia Pearson Date: Sun, 4 Sep 2022 15:43:12 +0200 Subject: game: adapt scripts to new design --- Scripts/Game/Game.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Scripts/Game/Game.cs (limited to 'Scripts/Game/Game.cs') diff --git a/Scripts/Game/Game.cs b/Scripts/Game/Game.cs new file mode 100644 index 0000000..50db736 --- /dev/null +++ b/Scripts/Game/Game.cs @@ -0,0 +1,25 @@ +using Godot; + +namespace Texty.Scripts.Game +{ + public class Game : Node + { + private Input Input => GetNodeOrNull($"%{nameof(Input)}"); + private Output Output => GetNodeOrNull($"%{nameof(Output)}"); + private StatusLine StatusLine => GetNodeOrNull($"%{nameof(StatusLine)}"); + + public override void _Ready() + { + } + + public void OnCommandSubmitted(Command command) + { + Output.Push($"! {command}"); + } + + public void OnUnknownInputSubmitted(string text) + { + Output.Push($"? {text}"); + } + } +} \ No newline at end of file -- cgit v1.2.3