Class PointerInput
- Namespace
- TDMaker.Unity.View
- Assembly
- TDMaker.Unity.dll
Mouse and keyboard access that works with both the Input System package and the legacy Input Manager.
public static class PointerInput
- Inheritance
-
PointerInput
- Inherited Members
Properties
CancelPressed
Whether Escape was pressed this frame.
public static bool CancelPressed { get; }
Property Value
HasPointer
Whether a mouse is present.
public static bool HasPointer { get; }
Property Value
HeroKeyPressed
Whether the hero selection key (H) was pressed this frame.
public static bool HeroKeyPressed { get; }
Property Value
MiddleHeld
Whether the middle button is held.
public static bool MiddleHeld { get; }
Property Value
Position
Pointer position in screen pixels (origin bottom-left).
public static Vector2 Position { get; }
Property Value
- Vector2
PrimaryHeld
Whether the primary (left) button is held.
public static bool PrimaryHeld { get; }
Property Value
PrimaryPressed
Whether the primary (left) button was pressed this frame.
public static bool PrimaryPressed { get; }
Property Value
PrimaryReleased
Whether the primary (left) button was released this frame.
public static bool PrimaryReleased { get; }
Property Value
Scroll
Vertical scroll this frame in notches (positive = away from the user).
public static float Scroll { get; }
Property Value
SecondaryPressed
Whether the secondary (right) button was pressed this frame.
public static bool SecondaryPressed { get; }
Property Value
Methods
DigitPressed(int)
Whether the number key digit (1-9, top row or keypad) was pressed this frame.
public static bool DigitPressed(int digit)
Parameters
digitint
Returns
KeyHeld(TDKey)
Whether key is held.
public static bool KeyHeld(TDKey key)
Parameters
keyTDKey
Returns
KeyPressed(TDKey)
Whether key went down this frame.
public static bool KeyPressed(TDKey key)
Parameters
keyTDKey