StarEngine
|
#include <SpritesheetComponent.h>
Public Member Functions | |
SpritesheetComponent (const tstring &filePath, const tstring &spriteName, const tstring &spritesheet) | |
~SpritesheetComponent () | |
void | Update (const Context &context) |
void | Play () |
void | Restart () |
void | Pause () |
void | Stop () |
void | PushAnimation (const tstring &animation) |
void | PlayAnimation (const tstring &animation) |
void | PlayNextAnimation () |
void | Reset () |
void | SetSpritesheet (const tstring &spritesheet) |
tstring | GetCurrentAnimation () const |
const tstring & | GetcurrentSpritesheet () const |
int | GetFramesHorizontal () const |
int | GetFramesVertical () const |
void | SetCallbackAnimations (const std::function< void()> &callback) |
bool | IsPlaying () |
Public Member Functions inherited from star::SpriteComponent | |
SpriteComponent (const tstring &filepath, const tstring &spriteName, bool bIsHUDElement=false, int widthSegments=1, int heightSegments=1) | |
virtual | ~SpriteComponent () |
void | Draw () |
const tstring & | GetFilePath () const |
const tstring & | GetName () const |
int32 | GetWidth () const |
int32 | GetHeight () const |
std::vector< GLfloat > | GetVertices () const |
std::vector< GLfloat > | GetUVCoords () const |
void | SetCurrentSegment (int widthSegment, int heightSegment) |
Public Member Functions inherited from star::BaseComponent | |
BaseComponent (void) | |
BaseComponent (Object *parent) | |
virtual | ~BaseComponent (void) |
void | Initialize () |
bool | IsInitialized () const |
Object * | GetParent () const |
void | SetParent (Object *parent) |
BaseScene * | GetGameScene () const |
TransformComponent * | GetTransform () const |
Protected Member Functions | |
void | InitializeComponent () |
void | CreateVertices () |
Protected Member Functions inherited from star::SpriteComponent | |
virtual void | CreateIndices () |
Protected Attributes | |
tstring | m_SpritesheetName |
Spritesheet | m_Spritesheet |
std::list< SpriteAnimation > | m_Animations |
Protected Attributes inherited from star::SpriteComponent | |
GLfloat | m_Vertices [12] |
GLfloat | m_UvCoords [8] |
int32 | m_Width |
int32 | m_WidthSegments |
int32 | m_CurrentWidthSegment |
int32 | m_Heigth |
int32 | m_HeightSegments |
int32 | m_CurrentHeightSegment |
Protected Attributes inherited from star::BaseComponent | |
Object * | m_pParentObject |
bool | m_bInitialized |
star::SpritesheetComponent::SpritesheetComponent | ( | const tstring & | filePath, |
const tstring & | spriteName, | ||
const tstring & | spritesheet | ||
) |
star::SpritesheetComponent::~SpritesheetComponent | ( | ) |
|
protectedvirtual |
Reimplemented from star::SpriteComponent.
tstring star::SpritesheetComponent::GetCurrentAnimation | ( | ) | const |
const tstring & star::SpritesheetComponent::GetcurrentSpritesheet | ( | ) | const |
int star::SpritesheetComponent::GetFramesHorizontal | ( | ) | const |
int star::SpritesheetComponent::GetFramesVertical | ( | ) | const |
|
protectedvirtual |
Reimplemented from star::SpriteComponent.
bool star::SpritesheetComponent::IsPlaying | ( | ) |
void star::SpritesheetComponent::Pause | ( | ) |
void star::SpritesheetComponent::Play | ( | ) |
void star::SpritesheetComponent::PlayAnimation | ( | const tstring & | animation | ) |
void star::SpritesheetComponent::PlayNextAnimation | ( | ) |
void star::SpritesheetComponent::PushAnimation | ( | const tstring & | animation | ) |
void star::SpritesheetComponent::Reset | ( | ) |
void star::SpritesheetComponent::Restart | ( | ) |
void star::SpritesheetComponent::SetCallbackAnimations | ( | const std::function< void()> & | callback | ) |
void star::SpritesheetComponent::SetSpritesheet | ( | const tstring & | spritesheet | ) |
void star::SpritesheetComponent::Stop | ( | ) |
|
virtual |
Reimplemented from star::SpriteComponent.
|
protected |
|
protected |
|
protected |