The Tricycle's Ninja
include/fase.h
00001 #ifndef _FASE_H_
00002 #define _FASE_H_
00003 
00004 #include <Gosu/Gosu.hpp>
00005 
00009 class Fase
00010 {
00011         Gosu::Image image;
00012         double posX, posY, velX, velY, angle;
00013 
00014         public:
00019                 Fase(Gosu::Graphics& graphics, std::wstring imagen):image(graphics,Gosu::sharedResourcePrefix() + imagen) {
00020                 posX = 0; posY = 0; velX = -1.5; velY = angle = 0;
00021                 }
00025                 void draw() const
00026                 {
00027                         image.draw(posX, posY,0);
00028                 }
00033                 void move()
00034                 {
00035                         posX = posX+velX;
00036                 }
00041                 double px()
00042                 {
00043                         return posX;    
00044                 }
00048                 void reset()
00049                 {posX=0;velX=-1.5;}
00053                  void acelerar(){velX=velX*1.25;}
00054 };
00055 #endif /* _FASE_H_ */
 All Classes Functions Variables