![]() |
YAPOG
0.0.1
Yet Another Pokemon Online Game
|
An ISprite that automatically evolves over time, playing predetertmined ISprite. More...
#include <AnimatedSprite.hpp>
Public Types | |
| enum | PlayState { None = 0, Once = 1, Loop = 2 } |
| typedef collection::Array < ISprite * >::SizeType | IndexType |
Public Member Functions | |
| virtual | ~AnimatedSprite () |
| void | AddFrame (ISprite *sprite) |
| void | RemoveFrame (ISprite *sprite) |
| void | ChangeState (PlayState playState) |
| void | SetDefaultFrame (IndexType index) |
Public Member Functions inherited from yap::BaseSprite | |
| BaseSprite () | |
| virtual | ~BaseSprite () |
| virtual const Vector2 & | GetPosition () const |
| Gets the coordinates in pixels of the origin of this ISpatial from the global origin. | |
| virtual const Vector2 & | GetSize () const |
| Gets the size in pixels of this ISpatial. | |
| virtual const Vector2 & | GetTopLeft () const |
| virtual const Vector2 & | GetBottomRight () const |
| virtual const Vector2 & | GetCenter () const |
| virtual const FloatRect & | GetRectangle () const |
| virtual void | Move (const Vector2 &offset) |
| virtual void | Scale (const Vector2 &factor) |
| virtual void | SetPosition (const Vector2 &position) |
| virtual void | SetSize (const Vector2 &size) |
| virtual void | Draw (IDrawingContext &context) |
| virtual bool | IsVisible () const |
| virtual void | Show (bool isVisible) |
| virtual void | ChangeColor (const sf::Color &color) |
| virtual void | Update (const Time &dt) |
| Makes the object evolve for one frame of the game. | |
Public Member Functions inherited from yap::ISprite | |
| virtual | ~ISprite () |
| virtual ISprite * | Clone () const |
Public Member Functions inherited from yap::ISpatial | |
| virtual | ~ISpatial () |
Public Member Functions inherited from yap::IDrawable | |
| virtual | ~IDrawable () |
Public Member Functions inherited from yap::IUpdateable | |
| virtual | ~IUpdateable () |
Public Member Functions inherited from yap::ILoadable | |
| virtual | ~ILoadable () |
Public Member Functions inherited from yap::ICloneable | |
| virtual | ~ICloneable () |
Protected Member Functions | |
| AnimatedSprite () | |
| AnimatedSprite (const AnimatedSprite ©) | |
| void | SetFrameSwitcher (FrameSwitcher *frameSwitcher) |
| virtual Vector2 | HandleGetSize () const |
| virtual void | HandleMove (const Vector2 &offset) |
| virtual void | HandleScale (const Vector2 &factor) |
| virtual void | HandleDraw (IDrawingContext &context) |
| virtual void | HandleShow (bool isVisible) |
| virtual void | HandleChangeColor (const sf::Color &color) |
| virtual void | HandleUpdate (const Time &dt) |
Protected Member Functions inherited from yap::BaseSprite | |
| BaseSprite (const BaseSprite ©) | |
Private Member Functions | |
| DISALLOW_ASSIGN (AnimatedSprite) | |
| void | SetCurrentFrame (IndexType index) |
| void | SetDefaultFrame () |
Private Attributes | |
| collection::Array< ISprite * > | sprites_ |
| FrameSwitcher * | frameSwitcher_ |
| PlayState | currentState_ |
| IndexType | currentIndex_ |
| ISprite * | currentFrame_ |
| IndexType | defaultIndex_ |
Static Private Attributes | |
| static const PlayState | DEFAULT_PLAY_STATE |
| static const IndexType | DEFAULT_DEFAULT_INDEX = 0 |
An ISprite that automatically evolves over time, playing predetertmined ISprite.
Definition at line 14 of file AnimatedSprite.hpp.
| typedef collection::Array<ISprite*>::SizeType yap::AnimatedSprite::IndexType |
Definition at line 27 of file AnimatedSprite.hpp.
Definition at line 20 of file AnimatedSprite.hpp.
|
virtual |
Definition at line 21 of file AnimatedSprite.cpp.
|
protected |
Definition at line 10 of file AnimatedSprite.cpp.
|
protected |
| void yap::AnimatedSprite::AddFrame | ( | ISprite * | sprite | ) |
Definition at line 46 of file AnimatedSprite.cpp.
| void yap::AnimatedSprite::ChangeState | ( | PlayState | playState | ) |
Definition at line 56 of file AnimatedSprite.cpp.
|
private |
|
protectedvirtual |
Implements yap::BaseSprite.
Definition at line 114 of file AnimatedSprite.cpp.
|
protectedvirtual |
Implements yap::BaseSprite.
Definition at line 102 of file AnimatedSprite.cpp.
|
protectedvirtual |
Reimplemented from yap::BaseSprite.
Definition at line 85 of file AnimatedSprite.cpp.
|
protectedvirtual |
Implements yap::BaseSprite.
Definition at line 90 of file AnimatedSprite.cpp.
|
protectedvirtual |
Implements yap::BaseSprite.
Definition at line 96 of file AnimatedSprite.cpp.
|
protectedvirtual |
Implements yap::BaseSprite.
Definition at line 110 of file AnimatedSprite.cpp.
|
protectedvirtual |
Implements yap::BaseSprite.
Definition at line 120 of file AnimatedSprite.cpp.
| void yap::AnimatedSprite::RemoveFrame | ( | ISprite * | sprite | ) |
|
private |
| void yap::AnimatedSprite::SetDefaultFrame | ( | IndexType | index | ) |
Definition at line 64 of file AnimatedSprite.cpp.
|
private |
Definition at line 80 of file AnimatedSprite.cpp.
|
protected |
|
private |
Definition at line 69 of file AnimatedSprite.hpp.
|
private |
Definition at line 68 of file AnimatedSprite.hpp.
|
private |
Definition at line 67 of file AnimatedSprite.hpp.
|
staticprivate |
Definition at line 63 of file AnimatedSprite.hpp.
|
staticprivate |
Definition at line 62 of file AnimatedSprite.hpp.
|
private |
Definition at line 70 of file AnimatedSprite.hpp.
|
private |
Definition at line 66 of file AnimatedSprite.hpp.
|
private |
Definition at line 65 of file AnimatedSprite.hpp.