From 40fc27154fe754181934dc7ee31375e6bdfb33fc Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 23 Oct 2018 12:23:58 +0800 Subject: *merge from minimal --- src/libjin/Graphics/je_sprite.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/libjin/Graphics/je_sprite.h (limited to 'src/libjin/Graphics/je_sprite.h') diff --git a/src/libjin/Graphics/je_sprite.h b/src/libjin/Graphics/je_sprite.h new file mode 100644 index 0000000..3b96162 --- /dev/null +++ b/src/libjin/Graphics/je_sprite.h @@ -0,0 +1,38 @@ +#ifndef __JE_SPRITE_H +#define __JE_SPRITE_H + +#include "../common/je_types.h" +#include "../math/je_vector2.hpp" + +#include "shader/je_shader.h" +#include "je_color.h" + +namespace JinEngine +{ + namespace Graphics + { + /// + /// A sprite is unit of rendering, logic and events. + /// + class Sprite + { + public: + void setOrigin(float x, float y); + void setPosition(int x, int y); + void setScale(float x, float y); + void setColor(Color color); + void setShader(const Shader* shader); + + private: + Math::Vector2 mPosition; + Math::Vector2 mOrigin; + Math::Vector2 mScale; + Color mColor; + const Shader* mShader; + + }; + + } // namespace Graphics +} // namespace JinEngine + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0