Add coin animation
This commit is contained in:
@@ -142,6 +142,11 @@ void doInput( std::shared_ptr< SDLPP::Scene > scene ) {
|
||||
coin_count++;
|
||||
coins->changeText(std::to_string(coin_count) + " COINS");
|
||||
}
|
||||
if ( mv.hasCoinBlock() ) {
|
||||
auto coin = mv.getCoinBlock();
|
||||
scene->addObject(coin);
|
||||
scene->setZIndex(coin, 1);
|
||||
}
|
||||
|
||||
// if player is > 0.7 of playground, move everything left
|
||||
auto playerX = mario->getRect().x;
|
||||
|
||||
Reference in New Issue
Block a user