Mario: only visit objects if they entered screen at least once
This commit is contained in:
@@ -42,6 +42,8 @@ public:
|
||||
bool isBouncing() const;
|
||||
bool isTraveling() const;
|
||||
void setBaseRect(SDL_Rect rect);
|
||||
void checkVisibility(double rightmost_x);
|
||||
bool wasVisible() const;
|
||||
|
||||
protected:
|
||||
double bounce_speed = 0.5;
|
||||
@@ -83,6 +85,7 @@ private:
|
||||
int _base_gravity_ticks = 1000 / 60;
|
||||
int _ticks_till_gravity = 0;
|
||||
double _gravity_acceleration = 1.0/(64.0/7.0);
|
||||
bool _was_visible = false;
|
||||
};
|
||||
|
||||
extern const std::vector< uint64_t > possibleBlocks;
|
||||
|
||||
Reference in New Issue
Block a user