00001 #ifndef H_PLATFORMS 00002 #define H_PLATFORMS 00003 00004 class GrassFloor : public AnimatedSprite 00005 { 00006 public: 00007 enum Section { LEFT, CENTER, RIGHT }; 00008 GrassFloor(Section which=CENTER) 00009 : AnimatedSprite("rsc/bgrass.xml") 00010 { 00011 int seq=rand()%6; 00012 if (which==LEFT) seq=6; 00013 if (which==RIGHT) seq=7; 00014 set("Floor","YES"); 00015 if (which==LEFT) set("Edge","Left"); 00016 if (which==RIGHT) set("Edge","Right"); 00017 set_active_sequence(seq); 00018 add_animation_object(this); 00019 } 00020 00021 virtual bool is_static_sprite() const { return true; } 00022 }; 00023 00024 #endif // H_PLATFORMS 00025