lab.cpp/SDL#4/xMario/xMarioMario.h

34 lines
872 B
C
Raw Normal View History

#ifndef DEF_XMARIOMARIO_H
#define DEF_XMARIOMARIO_H
class xMarioMario : public xSpriteAnimation{
public:
xMarioMario(xManager *manager, int x, int y); // Spritesheet avec taille de chaque sprite
2016-03-13 19:36:16 +00:00
void moveLeft(bool *run); // Deplacement a gauche
void moveRight(bool *run); // Deplacement a droite
void moveUp(bool *run); // Deplacement en haut
void moveDown(bool *run); // Deplacement en bas
private:
2016-03-13 19:36:16 +00:00
Uint32 _lastmove;
float _acceleration;
// Gestion du deplacement
thread *_left;
thread *_right;
thread *_up;
thread *_down;
// Fontions du thread
friend void xLeftMoveProcess(xMarioMario *m, bool *run);
friend void xRightMoveProcess(xMarioMario *m, bool *run);
friend void xUpMoveProcess(xMarioMario *m, bool *run);
friend void xDownMoveProcess(xMarioMario *m, bool *run);
};
#endif