Table of Contents

Class Input

Namespace
AO
Assembly
CoreAssembly.dll

Input is a core engine system to work with keyboard and mouse input.

public static class Input
Inheritance
Input
Inherited Members

Methods

GetKeyDown(Keycode, bool, CheckLevel)

Check if a key was pressed this frame.

public static bool GetKeyDown(Input.Keycode keycode, bool consume = false, Input.CheckLevel level = CheckLevel.Default)

Parameters

keycode Input.Keycode
consume bool
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetKeyHeld(Keycode, bool, CheckLevel)

Check if a key is held down.

[Obsolete("Use GetKeyHeld2(). The `consume` parameter has been removed from this function. `consume` for GetKey/MouseHeld() would consume the DOWN and REPEAT, so if you want that then do it explicitly by calling GetKey/MouseDown() with consume=true.")]
public static bool GetKeyHeld(Input.Keycode keycode, bool consume = false, Input.CheckLevel level = CheckLevel.Default)

Parameters

keycode Input.Keycode
consume bool
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetKeyHeld2(Keycode, CheckLevel)

Check if a key is held down.

public static bool GetKeyHeld2(Input.Keycode keycode, Input.CheckLevel level = CheckLevel.Default)

Parameters

keycode Input.Keycode
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetKeyUp(Keycode, bool, CheckLevel)

Check if a key was released this frame.

public static bool GetKeyUp(Input.Keycode keycode, bool consume = false, Input.CheckLevel level = CheckLevel.Default)

Parameters

keycode Input.Keycode
consume bool
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetMouseDown(MouseButton, bool, CheckLevel)

Get if a mouse button was pressed this frame.

public static bool GetMouseDown(Input.MouseButton mouse_button, bool consume = false, Input.CheckLevel level = CheckLevel.Default)

Parameters

mouse_button Input.MouseButton
consume bool
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetMouseHeld(MouseButton, bool, CheckLevel)

Get if a mouse button is held down.

[Obsolete("Use GetMouseHeld2(). The `consume` parameter has been removed from this function. `consume` for GetKey/MouseHeld() would consume the DOWN and REPEAT, so if you want that then do it explicitly by calling GetKey/MouseDown() with consume=true.")]
public static bool GetMouseHeld(Input.MouseButton mouse_button, bool consume = false, Input.CheckLevel level = CheckLevel.Default)

Parameters

mouse_button Input.MouseButton
consume bool
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetMouseHeld2(MouseButton, CheckLevel)

Get if a mouse button is held down.

public static bool GetMouseHeld2(Input.MouseButton mouse_button, Input.CheckLevel level = CheckLevel.Default)

Parameters

mouse_button Input.MouseButton
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.

GetMousePosition()

Get the mouse position in world space.

public static extern Vector2 GetMousePosition()

Returns

Vector2

Remarks

Input functions may only be called from the client.

GetMouseScreenPosition()

Get the mouse position in screen space.

public static extern Vector2 GetMouseScreenPosition()

Returns

Vector2

Remarks

Input functions may only be called from the client.

GetMouseUp(MouseButton, bool, CheckLevel)

Get if a mouse button was released this frame.

public static bool GetMouseUp(Input.MouseButton mouse_button, bool consume = false, Input.CheckLevel level = CheckLevel.Default)

Parameters

mouse_button Input.MouseButton
consume bool
level Input.CheckLevel

Returns

bool

Remarks

Input functions may only be called from the client.