18 lines
383 B
C++
18 lines
383 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;
|
||
|
}
|
||
|
}
|