2016-03-13 13:53:39 +00:00
|
|
|
#ifndef DEF_XMARIOGREENSHELL_H
|
|
|
|
|
|
|
|
#define DEF_XMARIOGREENSHELL_H
|
|
|
|
|
2016-03-18 10:15:02 +00:00
|
|
|
class xMarioGreenShell : public xSpriteAnimation, public xMarioMobile{
|
2016-03-13 13:53:39 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
xMarioGreenShell(xManager *manager, int x, int y); // Spritesheet avec taille de chaque sprite
|
2016-03-17 09:17:21 +00:00
|
|
|
|
2016-03-18 10:15:02 +00:00
|
|
|
// GETTERS
|
|
|
|
bool onFloor(); // Si mario est sur le sol
|
|
|
|
bool onWall(); // Si mario est contre un mur
|
|
|
|
|
|
|
|
// PROPAGATION AUX ENFANTS
|
|
|
|
vector<int> spreadMove();
|
|
|
|
void spreadTurn();
|
|
|
|
void spreadUpdateVelocity();
|
|
|
|
void spreadApplyGravity();
|
|
|
|
|
|
|
|
// Surcharge xSprite
|
|
|
|
void onCollide(vector<bool> from, xSprite* by);
|
2016-03-17 09:17:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool active(); // Retourne si le bloc est actif ou non
|
|
|
|
void active(bool active); // Active ou non le bloc
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool _active;
|
2016-03-18 10:15:02 +00:00
|
|
|
bool _way;
|
2016-03-17 09:17:21 +00:00
|
|
|
|
2016-03-13 13:53:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|