// Copyright (c) 2012-2022 Wojciech Figat. All rights reserved.
namespace FlaxEngine
{
///
/// Virtual input axis binding. Helps with listening for a selected axis input.
///
public class InputAxis
{
///
/// The name of the axis to use. See .
///
[Tooltip("The name of the axis to use.")]
public string Name;
///
/// Gets the current axis value.
///
public float Value => Input.GetAxis(Name);
///
/// Gets the current axis raw value.
///
public float ValueRaw => Input.GetAxisRaw(Name);
///
/// Initializes a new instance of the class.
///
public InputAxis()
{
}
///
/// Initializes a new instance of the class.
///
/// The axis name.
public InputAxis(string name)
{
Name = name;
}
}
}