remove previously trashed file

This commit is contained in:
arthur.jamet
2021-06-06 09:33:05 +02:00
parent 9b6cbaf948
commit 7ff9196a4f
@@ -1,37 +0,0 @@
//
// Created by Zoe Roux on 5/27/21.
//
#include "RenderScreenSystem.hpp"
#include "Component/Renderer/CameraComponent.hpp"
#include "Component/Position/PositionComponent.hpp"
namespace BBM
{
RenderScreenSystem::RenderScreenSystem(RAY::Window &window)
: WAL::System({
typeid(CameraComponent),
typeid(PositionComponent)
}),
_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);
}
void RenderScreenSystem::onUpdate(WAL::Entity &entity, std::chrono::nanoseconds dtime)
{
const auto &pos = entity.getComponent<PositionComponent>();
const auto &cam = entity.getComponent<CameraComponent>();
_camera.setPosition(pos.position);
_camera.setTarget(cam.target);
}
}