Mario: formatting
This commit is contained in:
@@ -8,8 +8,12 @@
|
||||
|
||||
class MarioVisitor : public SDLPP::Visitor {
|
||||
public:
|
||||
MarioVisitor(bool is_jumping, SDLPP::Scene &scene, bool &quit, int &coin_count, std::vector< std::shared_ptr< MarioBlock > > &moving_objects) : jumping(is_jumping), _scene(scene), _quit(quit), _coin_count(coin_count), _moving_objects(moving_objects) {}
|
||||
void visit( const SDLPP::RenderObject &obj ) override;
|
||||
MarioVisitor(bool is_jumping, SDLPP::Scene &scene, bool &quit,
|
||||
int &coin_count,
|
||||
std::vector<std::shared_ptr<MarioBlock>> &moving_objects)
|
||||
: jumping(is_jumping), _scene(scene), _quit(quit),
|
||||
_coin_count(coin_count), _moving_objects(moving_objects) {}
|
||||
void visit(const SDLPP::RenderObject &obj) override;
|
||||
bool isOnGround() const {
|
||||
return onGround;
|
||||
}
|
||||
@@ -22,13 +26,13 @@ public:
|
||||
double newXPos() const {
|
||||
return newX;
|
||||
}
|
||||
void setFromId( uint64_t id ) override {
|
||||
void setFromId(uint64_t id) override {
|
||||
from = id;
|
||||
}
|
||||
uint64_t getFromId() const override {
|
||||
return from;
|
||||
}
|
||||
void setVisitorType( uint64_t type ) override {
|
||||
void setVisitorType(uint64_t type) override {
|
||||
_type = type;
|
||||
}
|
||||
uint64_t getVisitorType() const override {
|
||||
@@ -125,7 +129,7 @@ private:
|
||||
bool &_quit;
|
||||
int &_coin_count;
|
||||
bool mushroom = false;
|
||||
std::vector< std::shared_ptr< MarioBlock > > &_moving_objects;
|
||||
std::vector<std::shared_ptr<MarioBlock>> &_moving_objects;
|
||||
bool _bounce = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user