Skip to content

File CameraSystem.hpp

File List > Engine > include > Systems > CameraSystem.hpp

Go to the documentation of this file

#ifndef ENGINE_SYSTEMS_CAMERASYSTEM_HPP_
#define ENGINE_SYSTEMS_CAMERASYSTEM_HPP_

#include "ECS/System.hpp"
#include <raylib.h>

namespace Engine {
class Registry;

class CameraSystem : public System {
  public:
    void Update(Registry& registry, float dt) override;

    static Camera2D GetActiveCamera(Registry& registry, float viewportWidth, float viewportHeight);

    static Vector2 ScreenToWorld(Registry& registry, Vector2 screen);

    static Vector2 WorldToScreen(Registry& registry, Vector2 world);
};
} // namespace Engine

#endif // ENGINE_SYSTEMS_CAMERASYSTEM_HPP_