2021-11-27 19:16:41 +00:00
|
|
|
#pragma once
|
2021-11-21 06:23:53 +00:00
|
|
|
|
|
|
|
#include "../destructable.h"
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace simpleengine {
|
|
|
|
class Event : public simpleengine::Destructable {
|
|
|
|
public:
|
2022-10-16 19:23:35 +00:00
|
|
|
/**
|
|
|
|
* @brief The update function with fixed-timestep.
|
|
|
|
*
|
|
|
|
* Since this is fixed timestep, this function is primarily for game-logic and physics updates.
|
|
|
|
*
|
|
|
|
* @param delta_time
|
|
|
|
*/
|
2021-11-21 06:23:53 +00:00
|
|
|
virtual void update(const float& delta_time) = 0;
|
2022-10-16 19:23:35 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The update function with varying-timestep.
|
|
|
|
*
|
|
|
|
* Since this has a varying timestep, this function is primarily for input related updates.
|
|
|
|
*
|
|
|
|
* @param delta_time
|
|
|
|
*/
|
|
|
|
virtual void input_update(const float& delta_time) {}
|
2021-11-21 06:23:53 +00:00
|
|
|
};
|
2021-11-27 19:16:41 +00:00
|
|
|
}
|