Add coin animation

This commit is contained in:
2021-07-24 20:50:24 +02:00
parent 130a01feda
commit e67cf508a2
12 changed files with 89 additions and 14 deletions
+7 -2
View File
@@ -34,6 +34,11 @@ public:
void setCoinCount( int coins );
void setDestructible( bool destructible = true );
void ensureCollision();
bool isBouncing();
protected:
double bounce_speed = 0.5;
int bounce_ticks = 100;
private:
bool _tool = false;
@@ -43,8 +48,8 @@ private:
bool _bouncing = false;
int _coins = 0;
bool _mushroom = false;
const int bounce_ticks = 100;
int ticks_to_bounce = bounce_ticks;
bool _release_coin = false;
int ticks_to_bounce = 0;
SDLPP::Vec2D< double > og_pos = {};
LandType::Value _type;
SDL_Rect _base_src;