2016-03-13 17:33:47 +00:00
|
|
|
#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
|
|
|
|
|
2016-03-13 17:33:47 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
|
2016-03-13 17:33:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|