add ship, improve inheritance
This commit is contained in:
11
src/Entity.h
11
src/Entity.h
@@ -1,8 +1,5 @@
|
||||
#pragma once
|
||||
#include <cctype>
|
||||
#include <ncurses.h>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
struct AssetPair {
|
||||
@@ -21,4 +18,12 @@ public:
|
||||
|
||||
float getX() const noexcept { return x; }
|
||||
float getY() const noexcept { return y; }
|
||||
|
||||
virtual void update() noexcept = 0;
|
||||
virtual bool isOffScreen() const noexcept = 0;
|
||||
virtual const std::vector<std::string> &getImage() const = 0;
|
||||
virtual const std::vector<std::string> &getMask() const = 0;
|
||||
virtual char getDefaultColor() const noexcept = 0;
|
||||
|
||||
void draw(int layer) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user