Mario: formatting

This commit is contained in:
2021-10-18 10:10:43 +02:00
parent 303490a619
commit 0d855ed218
20 changed files with 541 additions and 490 deletions
+3 -2
View File
@@ -2,14 +2,15 @@
#include "../sprites.hpp"
#include "../global_vars.hpp"
CoinBlock::CoinBlock( int x, int y, std::shared_ptr< SDLPP::Renderer > &renderer ) : MarioBlock(x, y, renderer, g_terrain_texture, COIN_SRC, true, true) {
CoinBlock::CoinBlock(int x, int y, std::shared_ptr<SDLPP::Renderer> &renderer)
: MarioBlock(x, y, renderer, g_terrain_texture, COIN_SRC, true, true) {
setHidden(true);
bounce_speed = 0.75;
bounce_ticks = 150;
}
void CoinBlock::custom_move(int ticks) {
if(_parent != nullptr && !_parent->isBouncing() && !isBouncing()) {
if (_parent != nullptr && !_parent->isBouncing() && !isBouncing()) {
setHidden(false);
bounce();
_parent = nullptr;