5 #include "video/drawing_context.h"
6 #include "special/sprite_manager.h"
11 #include "statistics.h"
13 Coin::Coin(const Vector& pos)
16 bbox.set_size(32, 32);
17 sprite = sprite_manager->create("coin");
31 Coin::draw(DrawingContext& context)
33 sprite->draw(context, get_pos(), LAYER_TILES);
39 Sector::current()->player->get_status().incCoins();
40 Sector::current()->add_object(new BouncyCoin(get_pos()));
41 global_stats.add_points(COINS_COLLECTED_STAT, 1);
46 Coin::collision(GameObject& other, const CollisionHit& )
48 Player* player = dynamic_cast<Player*>(&other);