8#ifndef W_OFFSET_COMPONENT_HPP
9#define W_OFFSET_COMPONENT_HPP
13#pragma GCC diagnostic push
14#pragma GCC diagnostic ignored "-Wfloat-equal"
15#pragma GCC diagnostic ignored "-Wswitch-default"
16#include <SFML/Graphics.hpp>
17#pragma GCC diagnostic pop
58 [[nodiscard]] sf::Vector2f
getOffset( )
const;
Component()
Protected constructor to restrict instantiation to derived classes.
Definition wComponent.cpp:17
OffsetComponent(sf::Vector2f offset=sf::Vector2f(0.0f, 0.0f))
Constructs the component with an optional offset.
Definition wOffsetComponent.cpp:17
virtual ~OffsetComponent()=default
sf::Vector2f getOffset() const
Returns the current offset.
Definition wOffsetComponent.cpp:29
void setOffset(sf::Vector2f offset)
Updates the logical offset value.
Definition wOffsetComponent.cpp:34
void debugPrint() const
Outputs the current offset value to the console for debugging.
Definition wOffsetComponent.cpp:56
void addOffset(sf::Vector2f delta)
Increments the current offset by a given vector.
Definition wOffsetComponent.cpp:45
Definition wColorComponent.cpp:9