mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-07 19:40:48 +00:00
add fps limit on window at construction
This commit is contained in:
@@ -15,10 +15,13 @@ namespace BBM
|
||||
}),
|
||||
_window(window),
|
||||
_camera(Vector3f(), Vector3f(), Vector3f(0, 1, 0), 50, CAMERA_PERSPECTIVE)
|
||||
{}
|
||||
{
|
||||
this->_window.setFPS(RenderScreenSystem::FPS);
|
||||
}
|
||||
|
||||
void RenderScreenSystem::onSelfUpdate()
|
||||
{
|
||||
this->_window.drawFPS(RAY::Vector2(1, 1));
|
||||
this->_window.draw();
|
||||
this->_window.clear();
|
||||
this->_window.useCamera(this->_camera);
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace BBM
|
||||
|
||||
//! @brief The camera used to render.
|
||||
RAY::Camera::Camera3D _camera;
|
||||
|
||||
//! @brief Window framerate limit
|
||||
static constexpr short FPS = 30;
|
||||
public:
|
||||
//! @brief A method called after all entities that this system manage has been updated.
|
||||
//! @note render on screen here
|
||||
|
||||
Reference in New Issue
Block a user