00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TG_RENDERER_COLOR_H
00019 #define TG_RENDERER_COLOR_H
00020
00021 #include "Renderer.h"
00022 #include "Vec.h"
00023
00024 namespace tagGame
00025 {
00026 class Obstacle;
00027
00029 class RendererColor : public Renderer
00030 {
00031 public:
00032 RendererColor();
00033 virtual ~RendererColor();
00034
00035 virtual void render(Obstacle const* o);
00036
00037 inline RealVec const& getColor() const;
00038 inline RealVec const& getColorAlternative() const;
00039 inline RealVec const& getColorFlash() const;
00040
00041 inline void setColor(RealVec const& color);
00042 inline void setColorAlternative(RealVec const& colorAlternative);
00043 inline void setColorFlash(RealVec const& colorFlash);
00044
00045 inline void flashingOn();
00046 inline void flashingOff();
00047
00048 inline void alternativeOn();
00049 inline void alternativeOff();
00050
00051 protected:
00052 private:
00053 RealVec color;
00054 RealVec colorAlternative;
00055 RealVec colorFlash;
00056
00057 bool flash;
00058 bool alternative;
00059 };
00060
00061 RealVec const& RendererColor::getColor() const
00062 {
00063 return color;
00064 }
00065
00066 RealVec const& RendererColor::getColorAlternative() const
00067 {
00068 return colorAlternative;
00069 }
00070
00071 RealVec const& RendererColor::getColorFlash() const
00072 {
00073 return colorFlash;
00074 }
00075
00076 void RendererColor::setColor(RealVec const& color)
00077 {
00078 this->color = color;
00079 }
00080
00081 void RendererColor::setColorAlternative(RealVec const& colorAlternative)
00082 {
00083 this->colorAlternative = colorAlternative;
00084 }
00085
00086 void RendererColor::setColorFlash(RealVec const& colorFlash)
00087 {
00088 this->colorFlash = colorFlash;
00089 }
00090
00091 void RendererColor::flashingOn()
00092 {
00093 flash = true;
00094 }
00095
00096 void RendererColor::flashingOff()
00097 {
00098 flash = false;
00099 }
00100
00101 void RendererColor::alternativeOn()
00102 {
00103 alternative = true;
00104 }
00105
00106 void RendererColor::alternativeOff()
00107 {
00108 alternative = false;
00109 }
00110 }
00111
00112 #endif