2021-10-27 12:19:10 +00:00
|
|
|
#ifndef ENGINE_DRAWABLE_H
|
|
|
|
#define ENGINE_DRAWABLE_H
|
2020-06-30 22:23:07 +00:00
|
|
|
|
2021-10-27 12:19:10 +00:00
|
|
|
#include "base/vecmath.h"
|
2020-06-30 22:23:07 +00:00
|
|
|
|
|
|
|
namespace eng {
|
|
|
|
|
|
|
|
class Drawable {
|
|
|
|
public:
|
|
|
|
Drawable();
|
|
|
|
virtual ~Drawable();
|
|
|
|
|
|
|
|
Drawable(const Drawable&) = delete;
|
|
|
|
Drawable& operator=(const Drawable&) = delete;
|
|
|
|
|
|
|
|
virtual void Draw(float frame_frac) = 0;
|
|
|
|
|
|
|
|
void SetZOrder(int z) { z_order_ = z; }
|
|
|
|
void SetVisible(bool visible) { visible_ = visible; }
|
|
|
|
|
|
|
|
int GetZOrder() const { return z_order_; }
|
|
|
|
bool IsVisible() const { return visible_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool visible_ = false;
|
|
|
|
int z_order_ = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace eng
|
|
|
|
|
2021-10-27 12:19:10 +00:00
|
|
|
#endif // ENGINE_DRAWABLE_H
|