Refactor to use objects for terrain/mod creation, added coin modifier
This commit is contained in:
+10
-1
@@ -3,7 +3,7 @@
|
||||
#include "objectids.hpp"
|
||||
#include "sprites.hpp"
|
||||
|
||||
Mario::Mario(const std::shared_ptr< SDLPP::Renderer > &renderer) : SDLPP::RectangleRender(0, 0, BLOCK_SIZE, BLOCK_SIZE, renderer, g_mario_texture, MARIO_STANDING_SRC) {
|
||||
Mario::Mario(int x, int y, const std::shared_ptr< SDLPP::Renderer > &renderer) : MarioBlock(x, y, renderer, g_mario_texture, MARIO_STANDING_SRC) {
|
||||
setAnimationFrames( MARIO_WALK_ANIM );
|
||||
setId( MARIO_ID );
|
||||
setAlignment( SDLPP::OBJ_CENTER, SDLPP::OBJ_CENTER );
|
||||
@@ -29,6 +29,7 @@ Mario::Mario(const std::shared_ptr< SDLPP::Renderer > &renderer) : SDLPP::Rectan
|
||||
setColiderColor("#FF0000");
|
||||
setStatic( false );
|
||||
}
|
||||
Mario::Mario(const std::shared_ptr< SDLPP::Renderer > &renderer) : Mario(0, 0, renderer) {}
|
||||
void Mario::walkLeft() {
|
||||
if(on_ground)
|
||||
resumeAnimation();
|
||||
@@ -138,3 +139,11 @@ void Mario::custom_move( int ticks ) {
|
||||
ticks_till_gravity += base_gravity_ticks;
|
||||
}
|
||||
}
|
||||
|
||||
void Mario::visit(SDLPP::Visitor &/*UNUSED*/) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void Mario::setWorldTypeSrc(LandType::Value /*UNUSED*/) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user