Table of Contents

Class Input

Namespace
BasilEngine
Assembly
BasilEngine.dll
[NativeClass("Input", ".")]
[NativeHeader("Bindings/ManagedInput.hpp")]
public static class Input
Inheritance
Input
Inherited Members

Properties

mousePosition

Current mouse position in screen coordinates.

public static Vector2 mousePosition { get; }

Property Value

Vector2

Methods

GetKey(KeyCode)

Get key held down.

public static bool GetKey(KeyCode key)

Parameters

key KeyCode

The keycode to get

Returns

bool

If the key is held or not.

GetKeyPress(KeyCode)

The key press.

public static bool GetKeyPress(KeyCode key)

Parameters

key KeyCode

The key to check if it is pressed.

Returns

bool

true if pressed else false

GetMouse(int)

Checks whether a mouse button is currently held.

public static bool GetMouse(int key)

Parameters

key int

Mouse button index.

Returns

bool

True if the button is down.

GetMouseDown(int)

Checks whether a mouse button was pressed this frame.

public static bool GetMouseDown(int key)

Parameters

key int

Mouse button index.

Returns

bool

True if the button was pressed this frame.

GetMouseScreenPosInternal(out float, out float)

[NativeMethod("GetMousePosition")]
[StaticAccessor("ManagedInput", StaticAccessorType.DoubleColon)]
public static extern void GetMouseScreenPosInternal(out float x, out float y)

Parameters

x float
y float