- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# C:/Documents and Settings/jegan/Desktop/projectX/ShowOneSprite.h

Go to the documentation of this file.

    00001 #ifndef SHOWONESPRITE_H
    00002 #define SHOWONESPRITE_H
    00003
    00004 #include <string>
    00005 #include <vector>
    00006
    00007 #include "Sprite.h"
    00008 #include "List.h"
    00009
    00010 class ShowOneSprite : public Sprite
    00011 {
    00012 public:
    00013         ShowOneSprite( std::string filename, List *spriteInfo );
    00014         ShowOneSprite(ShowOneSprite *sprite);
    00015         ~ShowOneSprite();
    00016
    00017         Sprite *instance();
    00018
    00019         //virtual SDL_Rect box() {return _sprites[_index]->box();}
    00020         virtual void reset();
    00021         void reset(int index);
    00022         virtual void draw(int x, int y, bool origin = LEVEL);
    00023         virtual void update(){_sprites[_index]->update();};
    00024         virtual void clean();
    00025         void show(int index) {_index = index;};
    00026
    00027
    00028 protected:
    00029         std::vector<Sprite *> _sprites;
    00030         std::vector<Sprite *> _createdSprites;
    00031         int _index;
    00032 };
    00033
    00034 #endif