Mario: better mushroom movement

This commit is contained in:
2021-08-07 22:17:27 +02:00
parent a194bfb86e
commit f7002f0f38
4 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -142,6 +142,7 @@ void doInput( std::shared_ptr< SDLPP::Scene > scene ) {
std::lock_guard< std::mutex > lock( render_mutex );
scene->updateScene();
auto prev_coin_count = coin_count;
// TODO only start doing visits once the object has been on screen at least once
for(size_t i = 0; i < moving_objects.size(); i++) {
auto visitor =
getVisitor( *moving_objects[i], *scene, quit, coin_count, moving_objects );
@@ -151,7 +152,6 @@ void doInput( std::shared_ptr< SDLPP::Scene > scene ) {
moving_objects[i]->getDoubleRect().second.getX();
if(rightmost_pos < 0) {
moving_objects[i]->destroy();
std::cout << "DESTRUCTION!!!!" << std::endl;
}
}
std::vector<uint64_t> killed_indices{};