2016-03-13 13:53:39 +00:00
|
|
|
#ifndef DEF_XMARIOMYSTERYBLOC_H
|
|
|
|
|
|
|
|
#define DEF_XMARIOMYSTERYBLOC_H
|
|
|
|
|
|
|
|
class xMarioMysteryBloc : public xSpriteAnimation{
|
|
|
|
|
|
|
|
public:
|
2016-03-16 11:08:22 +00:00
|
|
|
xMarioMysteryBloc(xManager *manager, int x, int y, int nb=1); // Spritesheet avec taille de chaque sprite
|
2016-03-13 23:06:33 +00:00
|
|
|
|
2016-03-16 09:17:28 +00:00
|
|
|
// Surcharge parent
|
|
|
|
void onCollide(vector<int> from, xSprite* by);
|
|
|
|
|
|
|
|
|
2016-03-13 23:06:33 +00:00
|
|
|
void jump(); // Effectue l'animation d'activation
|
|
|
|
void unjump(); // Effectue l'animation d'activation
|
|
|
|
|
|
|
|
bool active(); // Retourne si le bloc est actif ou non
|
|
|
|
void active(bool active); // Active ou non le bloc
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool _active;
|
|
|
|
int _jumps;
|
|
|
|
Uint32 _lastjump;
|
|
|
|
SDL_Rect _defaultrect;
|
|
|
|
|
2016-03-16 11:08:22 +00:00
|
|
|
int _nb_jumps; // nombre de coups avant de casser
|
|
|
|
|
2016-03-13 13:53:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|