sm.tool.interactState

The interact state describe what kind of interaction is made. This is used to check whether a mouse button or key was just made pressed, held, etc.

Kind: Constant

Environments: Game

Game

Open the full Game reference

The states are:

  • null – No keypress was made.
  • start – The key was just pressed.
  • hold – The key is held down.
  • stop – The key was just released.
Value Description
null 0
start 1
hold 2
stop 3

Returns:

Type Description
table The interact state list.