Skip to content

Game.Input.ProcessorDeviceType

Assembly: Assembly-CSharp
Namespace: Game.Input

Type: enum

Base: System.Enum

Summary: ProcessorDeviceType is an enumeration that identifies the type of input device being processed by the input system. It distinguishes between keyboard, mouse, and gamepad devices so code can branch logic or map input behavior per device type.


Fields

  • Keyboard
    Represents a keyboard input device.

  • Mouse
    Represents a mouse input device.

  • Gamepad
    Represents a gamepad (controller) input device.

Properties

  • This enum type has no custom properties. It inherits standard members from System.Enum (such as ToString, HasFlag, etc.).

Constructors

  • Enums in C# do not expose public constructors for creating values; values are the named members above. Under the hood the enum has the default value semantics provided by System.Enum.

Methods

  • This type does not declare any instance or static methods. Use the members and standard System.Enum methods, for example:
  • Enum.TryParse(...)
  • Enum.GetValues(typeof(ProcessorDeviceType))
  • value.ToString()

Usage Example

using Game.Input;

public void HandleDevice(ProcessorDeviceType device)
{
    switch (device)
    {
        case ProcessorDeviceType.Keyboard:
            // handle keyboard-specific processing
            break;
        case ProcessorDeviceType.Mouse:
            // handle mouse-specific processing
            break;
        case ProcessorDeviceType.Gamepad:
            // handle gamepad-specific processing
            break;
        default:
            // fallback
            break;
    }
}

// parsing from string
if (Enum.TryParse<ProcessorDeviceType>("Gamepad", out var parsed))
{
    // parsed == ProcessorDeviceType.Gamepad
}