feat: expand editor scripting asset and viewport flow
This commit is contained in:
94
managed/XCEngine.ScriptCore/Input.cs
Normal file
94
managed/XCEngine.ScriptCore/Input.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
namespace XCEngine
|
||||
{
|
||||
public static class Input
|
||||
{
|
||||
public static bool GetKey(KeyCode key)
|
||||
{
|
||||
return InternalCalls.Input_GetKey((int)key);
|
||||
}
|
||||
|
||||
public static bool GetKeyDown(KeyCode key)
|
||||
{
|
||||
return InternalCalls.Input_GetKeyDown((int)key);
|
||||
}
|
||||
|
||||
public static bool GetKeyUp(KeyCode key)
|
||||
{
|
||||
return InternalCalls.Input_GetKeyUp((int)key);
|
||||
}
|
||||
|
||||
public static bool GetMouseButton(int button)
|
||||
{
|
||||
return InternalCalls.Input_GetMouseButton(button);
|
||||
}
|
||||
|
||||
public static bool GetMouseButtonDown(int button)
|
||||
{
|
||||
return InternalCalls.Input_GetMouseButtonDown(button);
|
||||
}
|
||||
|
||||
public static bool GetMouseButtonUp(int button)
|
||||
{
|
||||
return InternalCalls.Input_GetMouseButtonUp(button);
|
||||
}
|
||||
|
||||
public static bool GetButton(string buttonName)
|
||||
{
|
||||
return InternalCalls.Input_GetButton(buttonName);
|
||||
}
|
||||
|
||||
public static bool GetButtonDown(string buttonName)
|
||||
{
|
||||
return InternalCalls.Input_GetButtonDown(buttonName);
|
||||
}
|
||||
|
||||
public static bool GetButtonUp(string buttonName)
|
||||
{
|
||||
return InternalCalls.Input_GetButtonUp(buttonName);
|
||||
}
|
||||
|
||||
public static float GetAxis(string axisName)
|
||||
{
|
||||
return InternalCalls.Input_GetAxis(axisName);
|
||||
}
|
||||
|
||||
public static float GetAxisRaw(string axisName)
|
||||
{
|
||||
return InternalCalls.Input_GetAxisRaw(axisName);
|
||||
}
|
||||
|
||||
public static bool anyKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return InternalCalls.Input_GetAnyKey();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool anyKeyDown
|
||||
{
|
||||
get
|
||||
{
|
||||
return InternalCalls.Input_GetAnyKeyDown();
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector3 mousePosition
|
||||
{
|
||||
get
|
||||
{
|
||||
InternalCalls.Input_GetMousePosition(out Vector3 position);
|
||||
return position;
|
||||
}
|
||||
}
|
||||
|
||||
public static Vector2 mouseScrollDelta
|
||||
{
|
||||
get
|
||||
{
|
||||
InternalCalls.Input_GetMouseScrollDelta(out Vector2 delta);
|
||||
return delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user