+
+ if (sprite->get_action() == "fade" && sprite->animation_done()) remove_me();
+}
+
+void
+Flame::draw(DrawingContext& context)
+{
+ //Draw the Sprite.
+ sprite->draw(context, get_pos(), LAYER_OBJECTS);
+ //Draw the light if dark
+ if(true){
+ context.get_light( get_bbox().get_middle(), &light );
+ if (light.red + light.green < 2.0){
+ context.push_target();
+ context.set_target(DrawingContext::LIGHTMAP);
+ sprite->draw(context, get_pos(), layer);
+ lightsprite->draw(context, get_bbox().get_middle(), 0);
+ context.pop_target();
+ }
+ }