+ if(physic.get_velocity_x() != 0) {
+ //Set Sprite rotation angle
+ sprite->set_angle(get_pos().x * 360.0f / (32.0f * M_PI));
+ }
+ //Draw the Sprite.
+ MovingSprite::draw(context);
+ //Draw shade
+ shadesprite->draw(context, get_pos(), layer);
+ //Draw the light when dark
+ context.get_light( get_bbox().get_middle(), &light );
+ if (light.red + light.green < 2.0){
+ context.push_target();
+ context.set_target(DrawingContext::LIGHTMAP);
+ lightsprite->draw(context, get_bbox().get_middle(), 0);
+ context.pop_target();
+ }