-
Notifications
You must be signed in to change notification settings - Fork 10
InputAPI
The Input API is used to detect various kinds of input.
Input.MouseClick
detects mouse click. This will desync unless handled properly.
Input.MouseWheel
detects mouse scroll. This will desync unless handled properly.
Input.KeyboardKey
detects keyboard input. This will desync unless handled properly.
Input.MouseWindow
returns the actual position relative to the top-left of the window/screen. This will desync unless handled properly.
Input.IsMouseOverUI
returns whether the mouse is over the UI parts of the screen. This will desync unless handled properly.
Input.MouseUI
returns the mouse position on the ui, resolution independant. This will desync unless handled properly.
Input.MouseTerrain
returns the mouse position on terrain in three dimensions. This will desync unless handled properly.
Input.BlockChat
blocks chat globally.
Using the Input.PlayerChat
event it is possible to modify or completely block input on a case by case basis.
Input.PlayerChat += (s, e) =>
{
// Prepends all messages with the current time.
e.Message = $"[{DateTime.Now}]: {e.Message}";
};
Input.PlayerChat += (s, e) =>
{
// Blocks all messages.
e.IsBlocked = true;
};