10 #include "app/globals.h"
11 #include "special/sprite_manager.h"
13 Flower::Flower(const Vector& pos, Type _type)
17 bbox.set_size(32, 32);
19 if(_type == FIREFLOWER)
20 sprite = sprite_manager->create("fireflower");
22 sprite = sprite_manager->create("iceflower");
31 Flower::action(float )
36 Flower::draw(DrawingContext& context)
38 sprite->draw(context, get_pos(), LAYER_OBJECTS);
42 Flower::collision(GameObject& other, const CollisionHit& )
44 Player* player = dynamic_cast<Player*>(&other);
48 if(type == FIREFLOWER)
49 player->got_power = Player::FIRE_POWER;
51 player->got_power = Player::ICE_POWER;
52 SoundManager::get()->play_sound(IDToSound(SND_COFFEE));