Dualie
Loading...
Searching...
No Matches
Transformable.hpp
1//
2// Created by caleb on 6/16/24.
3//
4
5#ifndef DUALIE_TRANSFORMABLE_HPP
6#define DUALIE_TRANSFORMABLE_HPP
7
8
9#include <Dualie/System/Vector2.hpp>
10
11namespace dl {
12
17
18 protected:
19 dl::Vector2f m_position;
20
21
22 public:
27 virtual void setPosition(const dl::Vector2f& position);
28
34 void setPosition(float x, float y);
35
40 virtual void move(const dl::Vector2f& offset);
41
47 void move(float xOffset, float yOffset);
48
52 const dl::Vector2f& getPosition() const;
53
54 };
55
56}
57
58
59#endif //DUALIE_TRANSFORMABLE_HPP
A base class for anything that has a position on the screen.
Definition Transformable.hpp:16
const dl::Vector2f & getPosition() const
Definition Transformable.cpp:16
virtual void setPosition(const dl::Vector2f &position)
Sets the position of the transformable.
Definition Transformable.cpp:8
virtual void move(const dl::Vector2f &offset)
Moves the transformable offset number of pixels.
Definition Transformable.cpp:20