refactor fish prepare for polymorphism
This commit is contained in:
13
src/Entity.h
13
src/Entity.h
@@ -5,15 +5,20 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
struct AssetPair {
|
||||
std::vector<std::string> image;
|
||||
std::vector<std::string> mask;
|
||||
};
|
||||
|
||||
class Entity {
|
||||
protected:
|
||||
float x;
|
||||
float y;
|
||||
|
||||
public:
|
||||
Entity() : x(0), y(0) {}
|
||||
virtual ~Entity() {}
|
||||
Entity() : x(0.0f), y(0.0f) {}
|
||||
virtual ~Entity() = default;
|
||||
|
||||
inline float getX() const { return x; }
|
||||
inline float getY() const { return y; }
|
||||
float getX() const noexcept { return x; }
|
||||
float getY() const noexcept { return y; }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user