Mario: destructible blocks
This commit is contained in:
+4
-1
@@ -41,13 +41,16 @@ void loadMap( std::shared_ptr< SDLPP::Scene > &scene,
|
||||
}
|
||||
}
|
||||
bool collision = false;
|
||||
bool destructible = false;
|
||||
if ( id == FLOOR_ID || id == BRICK_ID || id == BRICK_TOP_ID ) {
|
||||
collision = true;
|
||||
if(id != FLOOR_ID)
|
||||
destructible = true;
|
||||
}
|
||||
// TODO add modifiers to createTerrainBlock
|
||||
auto obj =
|
||||
createTerrainBlock( id, static_cast< LandType::Value >( type ),
|
||||
renderer, i, j, collision );
|
||||
renderer, i, j, collision, destructible );
|
||||
if ( obj != nullptr )
|
||||
scene->addObject( obj );
|
||||
if ( character ) {
|
||||
|
||||
Reference in New Issue
Block a user