mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-17 03:41:48 +01:00
Remove Point2f, replace with Vector2f
This commit is contained in:
@@ -19,11 +19,11 @@ void Animation::Update(float elapsedSec) {
|
||||
}
|
||||
}
|
||||
}
|
||||
void Animation::Draw(const Point2f& pos) const {
|
||||
void Animation::Draw(const Vector2f& pos) const {
|
||||
Draw(pos, Rectf{ pos.x, pos.y, m_SrcRect.width, m_SrcRect.height });
|
||||
}
|
||||
|
||||
void Animation::Draw(const Point2f& pos, const Rectf& dst) const {
|
||||
void Animation::Draw(const Vector2f& pos, const Rectf& dst) const {
|
||||
Rectf src = m_SrcRect;
|
||||
src.left += m_CurrentFrame * src.width;
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ public:
|
||||
~Animation();
|
||||
|
||||
void Update(float elapsedSec);
|
||||
void Draw(const Point2f& pos) const;
|
||||
void Draw(const Point2f& pos, const Rectf& dst) const;
|
||||
void Draw(const Vector2f& pos) const;
|
||||
void Draw(const Vector2f& pos, const Rectf& dst) const;
|
||||
|
||||
void SetPlaying(bool isPlaying) {
|
||||
m_isPlaying = isPlaying;
|
||||
|
||||
Reference in New Issue
Block a user