- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

# ShowOneSprite Class Reference

`#include <ShowOneSprite.h>`

Inheritance diagram for ShowOneSprite:

List of all members.

## Public Member Functions
| ShowOneSprite (std::string filename, List *spriteInfo)
| ShowOneSprite (ShowOneSprite *sprite)
| ~ShowOneSprite ()
Sprite * | instance ()
virtual void | reset ()
void | reset (int index)
virtual void | draw (int x, int y, bool origin=LEVEL)
virtual void | update ()
virtual void | clean ()
void | show (int index)
## Protected Attributes
std::vector< Sprite * > | _sprites
std::vector< Sprite * > | _createdSprites
int | _index

## Detailed Description

Definition at line 10 of file ShowOneSprite.h.

## Constructor & Destructor Documentation

ShowOneSprite::ShowOneSprite | ( | std::string | filename,
|  | List * | spriteInfo
| ) |

| Definition at line 5 of file ShowOneSprite.cpp. References Sprite::_filename, List::empty(), List::firstList(), Sprite::loadSprite(), and List::rest(). Referenced by instance().

ShowOneSprite::ShowOneSprite | ( | ShowOneSprite * | sprite | ) |

| Definition at line 76 of file ShowOneSprite.cpp. References _sprites.

ShowOneSprite::~ShowOneSprite | ( |  | ) |

| Definition at line 63 of file ShowOneSprite.cpp. References clean().

## Member Function Documentation

void ShowOneSprite::clean | ( |  | ) | `[virtual]`

| Reimplemented from Sprite. Definition at line 68 of file ShowOneSprite.cpp. References _createdSprites. Referenced by ~ShowOneSprite().

void ShowOneSprite::draw | ( | int | x,
|  | int | y,
|  | bool | origin = `LEVEL`
| ) | `[virtual]`

| Reimplemented from Sprite. Definition at line 82 of file ShowOneSprite.cpp. References Sprite::_box, Sprite::_direction, _index, and _sprites. Referenced by Person::draw().

Sprite * ShowOneSprite::instance | ( |  | ) | `[virtual]`

| Reimplemented from Sprite. Definition at line 93 of file ShowOneSprite.cpp. References _createdSprites, and ShowOneSprite().

void ShowOneSprite::reset | ( | int | index | ) |

| Definition at line 106 of file ShowOneSprite.cpp. References _sprites.

void ShowOneSprite::reset | ( |  | ) | `[virtual]`

| Reimplemented from Sprite. Definition at line 100 of file ShowOneSprite.cpp. References _sprites. Referenced by Person::jumpReset().

void ShowOneSprite::show | ( | int | index | ) | `[inline]`

| Definition at line 25 of file ShowOneSprite.h. References _index. Referenced by Person::draw().

virtual void ShowOneSprite::update | ( |  | ) | `[inline, virtual]`

| Reimplemented from Sprite. Definition at line 23 of file ShowOneSprite.h. References _index, and _sprites. Referenced by Person::update().

## Member Data Documentation

std::vector<Sprite *> ShowOneSprite::_createdSprites`[protected]`

| Definition at line 30 of file ShowOneSprite.h. Referenced by clean(), and instance().

int ShowOneSprite::_index`[protected]`

| Definition at line 31 of file ShowOneSprite.h. Referenced by draw(), show(), and update().

std::vector<Sprite *> ShowOneSprite::_sprites`[protected]`

| Definition at line 25 of file ShowOneSprite.h. Referenced by draw(), reset(), ShowOneSprite(), and update().

The documentation for this class was generated from the following files:

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