#pragma once
#include <MinimalEngine.h>
#include <Scene/Scene.h>
#include <System/ComponentSystem.h>
#include <Component/Camera.h>
#include <Component/KeyboardInput.h>

using namespace Seele;

class FlyCamSystem : public System::ComponentSystem<
    Component::KeyboardInput, 
    Component::Camera, 
    Component::Transform>
{
public:
    FlyCamSystem(PScene scene);
    virtual ~FlyCamSystem();
    virtual void update(Component::KeyboardInput& input, Component::Camera& camera, Component::Transform& transform) override;
private:
    float lastMouseX;
    float lastMouseY;
};
DEFINE_REF(FlyCamSystem)