kick
/Users/morten/Programmering/cpp/kick/src/kick/2d/component2d.h
00001 //
00002 // Created by morten on 26/07/14.
00003 //
00004 
00005 
00006 #pragma once
00007 #include "kick/scene/component.h"
00008 #include "kick/scene/game_object.h"
00009 #include "kick/math/bounds2.h"
00010 
00011 namespace kick {
00012     class Canvas;
00013     class Shader;
00014 
00015     class Component2D : public Component {
00016     public:
00017         Component2D(GameObject *gameObject, std::shared_ptr<Canvas> canvas);
00018 
00019         int order() const;
00020         virtual void setOrder(int order);
00021         virtual Shader* shader() const = 0;
00022 
00023         virtual void deactivated() override;
00024         virtual Bounds2 bounds() const = 0;
00025         virtual void setBounds(Bounds2 bounds) = 0;
00026     protected:
00027         std::shared_ptr<Canvas> mCanvas;
00028     private:
00029         friend class Canvas;
00030         int mOrder = 0;
00031     };
00032 }
00033 
00034 
00035 
 All Classes Functions Variables