6 #include "player_status.h"
8 #include "special/sprite_manager.h"
9 #include "video/drawing_context.h"
11 OneUp::OneUp(const Vector& pos)
14 bbox.set_size(32, 32);
15 sprite = sprite_manager->create("1up");
16 physic.set_velocity(100, 400);
25 OneUp::action(float elapsed_time)
27 if(!Sector::current()->inside(bbox))
30 movement = physic.get_movement(elapsed_time);
34 OneUp::draw(DrawingContext& context)
36 sprite->draw(context, get_pos(), LAYER_OBJECTS);
40 OneUp::collision(GameObject& other, const CollisionHit& )
42 Player* player = dynamic_cast<Player*> (&other);
44 player->get_status().incLives();