A bit-flag for the current state of a button input.

Static Fields and Properties

BtnState Active Is the button currently down, pressed?
BtnState Any Matches with all states!
BtnState Changed Has the button just changed state this frame?
BtnState Inactive Is the button currently up, unpressed?
BtnState JustActive Has the button just been pressed? Only true for a single frame.
BtnState JustInactive Has the button just been released? Only true for a single frame.


BtnState state = Input.Hand(Handed.Right).pinch;

// You can check a BtnState using bit-flag logic
if ((state & BtnState.Changed) > 0)
	Log.Info("Pinch state just changed!");

// Or you can check the same values with the extension methods, no
// bit flag logic :)
if (state.IsChanged())
	Log.Info("Pinch state just changed!");