Ctrl+K

Interop

Declaration

public static class Strawberry.Web.Interop

The interop class for web assembly. The main.js file of the game calls callbacks from this class.

Fields

RootUrl static

string RootUrl

Methods

Initialize static

void Initialize()

RequestRootURL static

string RequestRootURL()

OnKeyDown static

void OnKeyDown(bool shift, bool ctrl, bool alt, bool repeat, int code)

Parameters:

Name Type Description
shift System.Boolean
ctrl System.Boolean
alt System.Boolean
repeat System.Boolean
code System.Int32

OnKeyUp static

void OnKeyUp(bool shift, bool ctrl, bool alt, int code)

Parameters:

Name Type Description
shift System.Boolean
ctrl System.Boolean
alt System.Boolean
code System.Int32

OnMouseMove static

void OnMouseMove(int index, float x, float y)

Parameters:

Name Type Description
index System.Int32
x System.Single
y System.Single

OnMouseDown static

void OnMouseDown(int index, bool shift, bool ctrl, bool alt, int button)

Parameters:

Name Type Description
index System.Int32
shift System.Boolean
ctrl System.Boolean
alt System.Boolean
button System.Int32

OnMouseUp static

void OnMouseUp(int index, bool shift, bool ctrl, bool alt, int button)

Parameters:

Name Type Description
index System.Int32
shift System.Boolean
ctrl System.Boolean
alt System.Boolean
button System.Int32

OnCanvasResize static

void OnCanvasResize(float width, float height, float devicePixelRatio)

Parameters:

Name Type Description
width System.Single
height System.Single
devicePixelRatio System.Single

OnPause static

void OnPause()

OnResume static

void OnResume()

Events

KeyDown static

event Action<Keys, bool, bool, bool, bool> KeyDown

KeyUp static

event Action<Keys, bool, bool, bool> KeyUp

PointerDown static

event Action<PointerButtons, int, bool, bool, bool> PointerDown

PointerUp static

event Action<PointerButtons, int, bool, bool, bool> PointerUp

PointerMove static

event Action<int, float, float> PointerMove

Paused static

event Action Paused

Resumed static

event Action Resumed