Mario: prepartations for multiple moving objects

This commit is contained in:
2021-08-05 00:32:17 +02:00
parent 37f7bab63e
commit bfe658618e
19 changed files with 321 additions and 249 deletions
+17
View File
@@ -0,0 +1,17 @@
#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;
}
}