using System;
using UnityEngine;
namespace Framework.Input.States {
/// Inputs suitable for controlling a character in a platformer game
public class DialogueInputState {
/// Initializes a new input state
public DialogueInputState() {
this.Up = new Trigger();
this.Down = new Trigger();
this.Left = new Trigger();
this.Right = new Trigger();
this.Cancel = new Trigger();
this.Accept = new Trigger();
}
///
/// Current state of the 'up' trigger used to climb, shoot upwards or submit
///
[
DefaultKey(KeyCode.UpArrow),
DefaultJoystickAxis("Vertical+"),
Description("Move up")
]
public Trigger Up;
///
/// Current state of the 'down' trigger used to kneel, shoot downwards or submit
///
[
DefaultKey(KeyCode.DownArrow),
DefaultJoystickAxis("Vertical-"),
Description("Move down")
]
public Trigger Down;
/// Current state of the 'left' trigger used to struggle
[
DefaultKey(KeyCode.LeftArrow),
DefaultJoystickAxis("Horizontal-"),
Description("Move to the left")
]
public Trigger Left;
/// Current state of the 'right' trigger used to struggle
[
DefaultKey(KeyCode.RightArrow),
DefaultJoystickAxis("Horizontal+"),
Description("Move to the right")
]
public Trigger Right;
/// Current state of the 'cancel' trigger used to cancel dialogs
[
DefaultKey(KeyCode.Escape),
DefaultKey(KeyCode.Joystick1Button1),
Description("Cancel the current selection")
]
public Trigger Cancel;
/// Current state of the 'accept' trigger used to confirm dialogs
[
DefaultKey(KeyCode.Space),
DefaultKey(KeyCode.KeypadEnter),
DefaultKey(KeyCode.Return),
DefaultKey(KeyCode.Joystick1Button0),
Description("Accept the current selection")
]
public Trigger Accept;
}
} // namespace Framework.Input.States