using System; using UnityEngine; namespace Framework.Input.States { /// Inputs suitable for controlling a character in first person shooter public class ShooterInputState { /// Initializes a new input state public ShooterInputState() { this.Jump = new Trigger(); this.Fire = new Trigger(); } /// Horizontal movement [ Action("Left", "Right"), DefaultKey(KeyCode.LeftArrow, KeyCode.RightArrow), DefaultKey(KeyCode.A, KeyCode.D), DefaultJoystickAxis("Horizontal"), Description("Strafe left and right") ] public float Strafing; /// Horizontal movement [ Action("Backward", "Forward"), DefaultKey(KeyCode.DownArrow, KeyCode.UpArrow), DefaultKey(KeyCode.S, KeyCode.W), DefaultJoystickAxis("Vertical"), Description("Run backward and forward") ] public float Running; /// /// Current state of the 'sprint' trigger used to move extra fast /// [ DefaultKey(KeyCode.LeftShift), DefaultKey(KeyCode.RightShift), DefaultKey(KeyCode.Joystick1Button2), Description("Run extra fast") ] public Trigger Sprint; /// Current state of the 'jump' trigger used to jump [ DefaultKey(KeyCode.Space), DefaultKey(KeyCode.Joystick1Button1), Description("Jump up from the ground") ] public Trigger Jump; /// Current state of the 'left' trigger used to fire the gun [ DefaultKey(KeyCode.LeftControl), DefaultKey(KeyCode.Joystick1Button0), Description("Fire your weapon") ] public Trigger Fire; } } // namespace Framework.Input.States