From 07022c42a925d4d0c23ab31f0e75883766ce773a Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 21 Nov 2018 21:12:42 +0800 Subject: =?UTF-8?q?*=E5=8A=A8=E7=94=BB=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/graphics/je_sprite.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/libjin/graphics/je_sprite.h') diff --git a/src/libjin/graphics/je_sprite.h b/src/libjin/graphics/je_sprite.h index 4050ed8..c7c5a8b 100644 --- a/src/libjin/graphics/je_sprite.h +++ b/src/libjin/graphics/je_sprite.h @@ -6,6 +6,7 @@ #include "je_color.h" #include "je_graphic.h" +#include "je_renderable.h" namespace JinEngine { @@ -15,23 +16,10 @@ namespace JinEngine /// /// A sprite is unit of rendering. Animation is based on sprite, but not texture or other graphic stuff. /// - class Sprite + class Sprite : public IRenderable { public: - enum Origin - { - TopLeft, - TopCenter, - TopRight, - MiddleLeft, - MiddleCenter, - MiddleRight, - BottomLeft, - BottomCenter, - BottomRight - }; - Sprite(const Graphic* graphic, const Math::Quad& quad, Origin origin); Sprite(const Graphic* graphic, const Math::Quad& quad, float ox, float oy); @@ -44,7 +32,7 @@ namespace JinEngine Math::Vector2 getSize(); - void render(float x, float y, float sx, float sy, float r) const; + void render(float x, float y, float sx, float sy, float r) const override; private: -- cgit v1.1-26-g67d0