Add fly animations
This commit is contained in:
@@ -1,26 +1,34 @@
|
||||
#pragma once
|
||||
#include <functional>
|
||||
|
||||
#include "Texture.h"
|
||||
#include "TextureManager.h"
|
||||
|
||||
class Building
|
||||
{
|
||||
public:
|
||||
Building(const std::string& filePath, const Vector2f& position, TextureManager* pTextureManager);
|
||||
Building(const Building& other) = default;
|
||||
Building(Building&& other) = default;
|
||||
Building& operator=(const Building& other) = default;
|
||||
Building& operator=(Building&& other) = default;
|
||||
Building(const std::string& filePath, const Vector2f& position, const Rectf& boundingBox, TextureManager* pTextureManager);
|
||||
// Building(const Building& other) = default;
|
||||
// Building(Building&& other) = default;
|
||||
// Building& operator=(const Building& other) = default;
|
||||
// Building& operator=(Building&& other) = default;
|
||||
|
||||
~Building();
|
||||
|
||||
void Draw() const;
|
||||
void Update(float dt);
|
||||
void Update(float dt, const Rectf& objectBoundingBox);
|
||||
|
||||
void SetOnEnterHitbox(std::function<void(void)> onEnterHitbox);
|
||||
|
||||
private:
|
||||
bool IsObjectInHitbox(const Rectf& objectBoundingBox) const;
|
||||
|
||||
Texture* m_Texture;
|
||||
Vector2f m_Position;
|
||||
Vector2f m_Size;
|
||||
|
||||
Rectf m_boundingBox;
|
||||
|
||||
Rectf m_BoundingBox;
|
||||
std::function<void(void)> m_OnEnterHitbox;
|
||||
bool m_IsPlayerInHitbox{ false };
|
||||
bool m_DidPlayerEnterHitbox{ false };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user