summaryrefslogtreecommitdiff
path: root/scripts/Character.cs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Character.cs')
-rw-r--r--scripts/Character.cs48
1 files changed, 0 insertions, 48 deletions
diff --git a/scripts/Character.cs b/scripts/Character.cs
deleted file mode 100644
index 1db6ee1..0000000
--- a/scripts/Character.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Godot;
-using System;
-
-public partial class Character : Actor {
- private bool canAct = false;
-
- public override void _Input(InputEvent @event)
- {
- base._Input(@event);
-
- if (!@event.IsPressed()) return;
-
- if (canAct) {
-
-
- if (@event.IsActionPressed("walk-up")) {
- Walk(Vector2I.Up);
- }
- if (@event.IsActionPressed("walk-down")) {
- Walk(Vector2I.Down);
- }
- if (@event.IsActionPressed("walk-left")) {
- Walk(Vector2I.Left);
- }
- if (@event.IsActionPressed("walk-right")) {
- Walk(Vector2I.Right);
- }
-
- if (@event.IsActionPressed("skip-turn")) {
- SkipTurn();
- }
- }
- }
-
- private void SkipTurn() {
- Energy = 0;
- EndAction();
- }
-
- protected override void EndAction() {
- canAct = false;
- base.EndAction();
- }
-
- public override void PerformAction() {
- canAct = true;
- }
-}