40 if (transform ==
nullptr)
45 if (scrolling.fit_width && (scale !=
nullptr))
47 const auto targetWidth =
static_cast<float>(width);
48 const float scaleX = targetWidth / std::max(1.0f, scrolling.original_width);
53 const float scaledHeight = ((scale !=
nullptr) ? scale->
y : 1.0f) * scrolling.original_height;
64 transform->x += scrolling.speed_x * dt;
66 if (
const float scaledWidth = ((scale !=
nullptr) ? scale->
x : 1.0f) * scrolling.original_width;
67 transform->x + scaledWidth < 0.0f)
69 transform->x += scaledWidth +
static_cast<float>(width);
75 const std::shared_ptr<eng::IRenderer> &
m_renderer;
This file contains the component definitions.
Configuration constants for the multiplayer game.
This file contains the IRenderer class declaration.
This file contains the interface for systems.
This file contains the Registry class declaration.
Abstract class for system.
Class for managing entities and their components.
bool hasComponent(Entity e)
std::unordered_map< Entity, T > & getAll()
T * getComponent(Entity e)
virtual WindowSize getWindowSize()=0
constexpr float FLOOR_OFFSET_Y
constexpr float CEILING_OFFSET_Y