Add Tick method to input device

This commit is contained in:
2023-10-14 18:29:32 +02:00
parent f5337ce6ec
commit 57e4352c6c
4 changed files with 14 additions and 0 deletions

View File

@@ -40,6 +40,8 @@ namespace OpenVulkano::Input
public:
~InputDevice() override = default;
virtual void Tick() {}
void Close() override
{
this->deviceType = InputDeviceType::UNKNOWN;

View File

@@ -79,4 +79,12 @@ namespace OpenVulkano::Input
}
return false;
}
void InputManager::Tick()
{
for(InputDevice* device : devices)
{
device->Tick();
}
}
}

View File

@@ -22,6 +22,8 @@ namespace OpenVulkano::Input
public:
static InputManager* GetInstance();
void Tick();
void RegisterInputDevice(InputDevice* device)
{
devices.push_back(device);