Fixed Input IsKeyPressed system, F6 to pause the game while running, F6 to start/stop

This commit is contained in:
Antoine Pilote
2024-04-27 15:17:58 -04:00
parent 4e8824bc1d
commit bf8557310e
9 changed files with 40 additions and 36 deletions

View File

@@ -69,14 +69,14 @@ namespace Nuake {
static void IsKeyDown(WrenVM* vm)
{
int key = (int)wrenGetSlotDouble(vm, 1);
bool result = Input::IsKeyDown(key);
bool result = Input::IsKeyDown((Key)key);
wrenSetSlotBool(vm, 0, result);
}
static void IsKeyPressed(WrenVM* vm)
{
int key = (int)wrenGetSlotDouble(vm, 1);
bool result = Input::IsKeyPressed(key);
bool result = Input::IsKeyPressed((Key)key);
wrenSetSlotBool(vm, 0, result);
}