All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
star::SpritesheetComponent Class Referencefinal

#include <SpritesheetComponent.h>

Inheritance diagram for star::SpritesheetComponent:
Inheritance graph
Collaboration diagram for star::SpritesheetComponent:
Collaboration graph

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 tstringGetcurrentSpritesheet () 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 tstringGetFilePath () const
const tstringGetName () 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
ObjectGetParent () const
void SetParent (Object *parent)
BaseSceneGetGameScene () const
TransformComponentGetTransform () 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< SpriteAnimationm_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
bool m_bInitialized

Constructor & Destructor Documentation

star::SpritesheetComponent::SpritesheetComponent ( const tstring filePath,
const tstring spriteName,
const tstring spritesheet 
star::SpritesheetComponent::~SpritesheetComponent ( )

Member Function Documentation

void star::SpritesheetComponent::CreateVertices ( )

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
void star::SpritesheetComponent::InitializeComponent ( )

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 ( )
void star::SpritesheetComponent::Update ( const Context context)

Reimplemented from star::SpriteComponent.

Member Data Documentation

std::list<SpriteAnimation> star::SpritesheetComponent::m_Animations
Spritesheet star::SpritesheetComponent::m_Spritesheet
tstring star::SpritesheetComponent::m_SpritesheetName

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