Adding more stuff

This commit is contained in:
Dynamitos committed 2024-05-16 19:45:44 +02:00
1 parent 79bfb1fd65
commit d12508818f
224 files changed
+16092 -11

No files matched your search

+5 -3
View File
@@ -1,15 +1,15 @@
#include "FlyCamSystem.h"
FlyCamSystem::FlyCamSystem(PScene scene)
: System::ComponentSystem<Component::KeyboardInput, Component::Camera, Component::Transform>(scene) {}
: System::ComponentSystem<Component::KeyboardInput, Component::Camera, Component::Transform, Component::PointLight>(scene) {}
FlyCamSystem::~FlyCamSystem() {}
void FlyCamSystem::update(Component::KeyboardInput& input, Component::Camera& camera, Component::Transform& transform) {
void FlyCamSystem::update(Component::KeyboardInput& input, Component::Camera& camera, Component::Transform& transform, Component::PointLight& light) {
float cameraMove = static_cast<float>(deltaTime);
if(input.keys[KeyCode::KEY_LEFT_SHIFT])
{
cameraMove *= 500;
cameraMove *= 5;
}
Vector forward = transform.getForward();
Vector side = transform.getRight();
@@ -49,4 +49,6 @@ void FlyCamSystem::update(Component::KeyboardInput& input, Component::Camera& ca
{
camera.mouseMove(input.deltaX, input.deltaY);
}
light.colorRange.w += input.scrollY * 0.1;
light.positionWS = Vector4(transform.getPosition(), 1);
}