Game.Input.AxisComponent
Assembly:
Assembly-CSharp.dll
Namespace:
Game.Input
Type: enum
Base: System.Enum
Summary: Represents which side (direction) of an input axis is being referenced. Typically used by the input system to distinguish the positive and negative directions of an axis (e.g., right/left, up/down). The enum uses the default underlying type int; members are explicitly/implicitly assigned integer values.
Fields
-
Negative = 2
Indicates the negative direction of an axis (for example: left or down). The explicit value is 2, so subsequent members increment from this value. -
Positive
Indicates the positive direction of an axis (for example: right or up). As it followsNegative = 2
, this member has the value 3.
Properties
- None
This enum defines simple named constant values and has no properties.
Constructors
- None
Enums do not expose constructors in the usual sense. Instances are created by assigning one of the defined member values.
Methods
- None
No methods are defined on this enum beyond the standard System.Enum methods (ToString, HasFlag, etc.).
Usage Example
// Example: using AxisComponent to interpret input direction
void HandleAxisInput(float axisValue)
{
AxisComponent dir = axisValue < 0f ? AxisComponent.Negative : AxisComponent.Positive;
switch (dir)
{
case AxisComponent.Negative:
// handle left/down
break;
case AxisComponent.Positive:
// handle right/up
break;
}
}
// Converting to the underlying integer value
int numeric = (int)AxisComponent.Positive; // numeric == 3