Tramway SDK
Public Member Functions | Protected Attributes | List of all members
tram::SpriteComponent Class Reference

#include <sprite.h>

Inheritance diagram for tram::SpriteComponent:
tram::EntityComponent

Public Member Functions

 SpriteComponent ()
 
 ~SpriteComponent ()
 
name_t GetSprite ()
 
void SetSprite (Render::Sprite *sprite)
 
void Start ()
 
void Update ()
 
void Play ()
 
void Pause ()
 
void SetPlaySpeed (size_t speed)
 
void UpdateRenderListObject ()
 
void UpdateLocation (vec3 nlocation)
 
void EventHandler (Event &event)
 
- Public Member Functions inherited from tram::EntityComponent
 EntityComponent ()
 
virtual ~EntityComponent ()
 
virtual void Init ()
 
bool IsReady ()
 
bool IsInit ()
 
EntityGetParent ()
 
void SetParent (Entity *parent)
 

Protected Attributes

ResourceProxy< Render::Spritesprite
 
vec3 location
 
size_t anim_frame = 0
 
size_t anim_speed = 0
 
size_t anim_bframe = 0
 
bool anim_isplaying = false
 
Render::drawlistentry_t draw_list_entry = {.generic = nullptr}
 
Render::vertexarray_t vertex_array = {.generic = nullptr}
 
- Protected Attributes inherited from tram::EntityComponent
size_t resources_waiting = 0
 
bool is_ready = false
 
bool is_init = false
 
Entityparent = nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from tram::EntityComponent
void ResourceReady ()
 

Constructor & Destructor Documentation

◆ SpriteComponent()

tram::SpriteComponent::SpriteComponent ( )
inline

◆ ~SpriteComponent()

tram::SpriteComponent::~SpriteComponent ( )

Member Function Documentation

◆ EventHandler()

void tram::SpriteComponent::EventHandler ( Event event)
inlinevirtual

Implements tram::EntityComponent.

◆ GetSprite()

name_t tram::SpriteComponent::GetSprite ( )
inline

◆ Pause()

void tram::SpriteComponent::Pause ( )

◆ Play()

void tram::SpriteComponent::Play ( )

◆ SetPlaySpeed()

void tram::SpriteComponent::SetPlaySpeed ( size_t  speed)

◆ SetSprite()

void tram::SpriteComponent::SetSprite ( Render::Sprite sprite)
inline

◆ Start()

void tram::SpriteComponent::Start ( )
virtual

Implements tram::EntityComponent.

◆ Update()

void tram::SpriteComponent::Update ( )

◆ UpdateLocation()

void tram::SpriteComponent::UpdateLocation ( vec3  nlocation)
inline

◆ UpdateRenderListObject()

void tram::SpriteComponent::UpdateRenderListObject ( )

Member Data Documentation

◆ anim_bframe

size_t tram::SpriteComponent::anim_bframe = 0
protected

◆ anim_frame

size_t tram::SpriteComponent::anim_frame = 0
protected

◆ anim_isplaying

bool tram::SpriteComponent::anim_isplaying = false
protected

◆ anim_speed

size_t tram::SpriteComponent::anim_speed = 0
protected

◆ draw_list_entry

Render::drawlistentry_t tram::SpriteComponent::draw_list_entry = {.generic = nullptr}
protected

◆ location

vec3 tram::SpriteComponent::location
protected

◆ sprite

ResourceProxy<Render::Sprite> tram::SpriteComponent::sprite
protected

◆ vertex_array

Render::vertexarray_t tram::SpriteComponent::vertex_array = {.generic = nullptr}
protected

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