00001 #ifndef H_CLOUD 00002 #define H_CLOUD 00003 00004 class Cloud : public AnimatedSprite 00005 { 00006 static xstring get_name() 00007 { 00008 int n=rand()%3+1; 00009 std::ostringstream os; 00010 os << "rsc/cloud" << n << ".xml"; 00011 return os.str(); 00012 } 00013 public: 00014 Cloud() 00015 : AnimatedSprite(get_name()) 00016 { 00017 set_position(iVec2(rand()%540,rand()%400)); 00018 add_animation_object(this); 00019 } 00020 virtual bool is_collidable() const { return false; } 00021 virtual bool is_static_sprite() const { return true; } 00022 }; 00023 00024 #endif // H_CLOUD 00025