Add Tick method to input device
This commit is contained in:
@@ -40,6 +40,8 @@ namespace OpenVulkano::Input
|
||||
public:
|
||||
~InputDevice() override = default;
|
||||
|
||||
virtual void Tick() {}
|
||||
|
||||
void Close() override
|
||||
{
|
||||
this->deviceType = InputDeviceType::UNKNOWN;
|
||||
|
||||
@@ -79,4 +79,12 @@ namespace OpenVulkano::Input
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void InputManager::Tick()
|
||||
{
|
||||
for(InputDevice* device : devices)
|
||||
{
|
||||
device->Tick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ namespace OpenVulkano::Input
|
||||
public:
|
||||
static InputManager* GetInstance();
|
||||
|
||||
void Tick();
|
||||
|
||||
void RegisterInputDevice(InputDevice* device)
|
||||
{
|
||||
devices.push_back(device);
|
||||
|
||||
Reference in New Issue
Block a user