game/mario/visitors/bounce_visitor.cpp
zv0n 0d855ed218
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone Build was killed
Mario: formatting
2021-10-18 10:10:43 +02:00

18 lines
380 B
C++

#include "bounce_visitor.hpp"
#include "../../sdlpp/sdlpp_renderobject.hpp"
#include "../objectids.hpp"
void BounceVisitor::visit(const SDLPP::RenderObject &obj) {
auto id = obj.getId();
switch (id) {
case FLOOR_ID:
case BRICK_ID:
case BRICK_TOP_ID:
if (from == BOUNCE_COLLISION) {
hits += 1;
}
default:
break;
}
}