9 #include "app/globals.h"
10 #include "special/sprite_manager.h"
12 Flower::Flower(const Vector& pos, Type _type)
16 bbox.set_size(32, 32);
18 if(_type == FIREFLOWER)
19 sprite = sprite_manager->create("fireflower");
21 sprite = sprite_manager->create("iceflower");
30 Flower::action(float )
35 Flower::draw(DrawingContext& context)
37 sprite->draw(context, get_pos(), LAYER_OBJECTS);
41 Flower::collision(GameObject& other, const CollisionHit& )
43 Player* player = dynamic_cast<Player*>(&other);
47 if(type == FIREFLOWER)
48 player->got_power = Player::FIRE_POWER;
50 player->got_power = Player::ICE_POWER;
51 SoundManager::get()->play_sound(IDToSound(SND_COFFEE));