Mario: destructible blocks
This commit is contained in:
+6
-5
@@ -7,7 +7,7 @@
|
||||
class MarioBlock : public SDLPP::RectangleRender {
|
||||
public:
|
||||
MarioBlock( int x, int y, std::shared_ptr< SDLPP::Renderer > renderer,
|
||||
std::shared_ptr< SDLPP::Texture > texture, SDL_Rect src );
|
||||
std::shared_ptr< SDLPP::Texture > texture, SDL_Rect src, bool destructible = false );
|
||||
void visit( SDLPP::Visitor &visitor ) override;
|
||||
void setTool( bool tool = true );
|
||||
void setTerrain( bool terrain = true );
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
private:
|
||||
bool _tool = false;
|
||||
bool _terrain = true;
|
||||
bool _destructible = false;
|
||||
};
|
||||
|
||||
extern const std::vector< uint64_t > possibleBlocks;
|
||||
@@ -35,21 +36,21 @@ struct BlockRole {
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createTerrainBlock( uint64_t block_id, LandType::Value type,
|
||||
std::shared_ptr< SDLPP::Renderer > &renderer,
|
||||
bool collision = false );
|
||||
bool collision = false, bool destructible = false );
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createTerrainBlock( uint64_t block_id, LandType::Value type,
|
||||
std::shared_ptr< SDLPP::Renderer > &renderer, int x, int y,
|
||||
bool collision = false );
|
||||
bool collision = false, bool destructible = false );
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createTerrainBlock( uint64_t block_id, LandType::Value type,
|
||||
std::shared_ptr< SDLPP::Renderer > &renderer,
|
||||
std::shared_ptr< SDLPP::Texture > texture,
|
||||
bool collision = false );
|
||||
bool collision = false, bool destructible = false );
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createTerrainBlock( uint64_t block_id, LandType::Value type,
|
||||
std::shared_ptr< SDLPP::Renderer > &renderer, int x, int y,
|
||||
std::shared_ptr< SDLPP::Texture > texture,
|
||||
bool collision = false );
|
||||
bool collision = false, bool destructible = false );
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createMario( LandType::Value type, std::shared_ptr< SDLPP::Renderer > &renderer,
|
||||
int x, int y );
|
||||
|
||||
Reference in New Issue
Block a user