RType
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Animatable Class Reference

#include <Animatable.hpp>

Inheritance diagram for Animatable:
Inheritance graph
[legend]
Collaboration diagram for Animatable:
Collaboration graph
[legend]

Public Member Functions

 Animatable ()
 Construct a new Animatable:: Animatable object. More...
 
char * getAttribute () const override
 getAttribute, get the attribute More...
 
void setAttribute (std::string attribute) override
 setAttribute, set the attribute More...
 
void setTarget (std::shared_ptr< Drawable > target)
 setTarget, set the target More...
 
std::shared_ptr< DrawablegetTarget ()
 getTarget, get the target More...
 
void setTime (timeval frametime)
 setTime, set the time More...
 
timeval getTime ()
 getTime, get the time More...
 
- Public Member Functions inherited from IComponentRType
virtual ~IComponentRType ()=default
 Construct a new IComponentRType object. More...
 

Public Attributes

timeval _now
 
timeval _diff
 
timeval _chrono
 
int _numberFrameToAnim
 
int _frameIndex
 
int _numberFrame
 
int _startFrameIndex
 
int _frameForOnePicture
 

Protected Attributes

std::shared_ptr< Drawablesprite
 
timeval _frametime
 
- Protected Attributes inherited from IComponentRType
char * _attribute
 

Detailed Description

Definition at line 18 of file Animatable.hpp.

Constructor & Destructor Documentation

◆ Animatable()

Animatable::Animatable ( )

Construct a new Animatable:: Animatable object.

Definition at line 16 of file Animatable.cpp.

References IComponentRType::_attribute.

Member Function Documentation

◆ getAttribute()

char * Animatable::getAttribute ( ) const
overridevirtual

getAttribute, get the attribute

Returns
attribute (char *)

Implements IComponentRType.

Definition at line 26 of file Animatable.cpp.

References IComponentRType::_attribute.

◆ getTarget()

std::shared_ptr< Drawable > Animatable::getTarget ( )

getTarget, get the target

Returns
target (std::shared_ptr<Drawable>)

Definition at line 55 of file Animatable.cpp.

◆ getTime()

timeval Animatable::getTime ( )

getTime, get the time

Returns
timeval

Definition at line 73 of file Animatable.cpp.

References _frametime.

◆ setAttribute()

void Animatable::setAttribute ( std::string  attribute)
overridevirtual

setAttribute, set the attribute

Parameters
attribute

Implements IComponentRType.

Definition at line 35 of file Animatable.cpp.

References IComponentRType::_attribute.

◆ setTarget()

void Animatable::setTarget ( std::shared_ptr< Drawable target)

setTarget, set the target

Parameters
target

Definition at line 46 of file Animatable.cpp.

◆ setTime()

void Animatable::setTime ( timeval  frametime)

setTime, set the time

Parameters
frametime

Definition at line 64 of file Animatable.cpp.

References _frametime.

Member Data Documentation

◆ _chrono

timeval Animatable::_chrono

Definition at line 71 of file Animatable.hpp.

◆ _diff

timeval Animatable::_diff

Definition at line 70 of file Animatable.hpp.

◆ _frameForOnePicture

int Animatable::_frameForOnePicture

Definition at line 76 of file Animatable.hpp.

◆ _frameIndex

int Animatable::_frameIndex

Definition at line 73 of file Animatable.hpp.

◆ _frametime

timeval Animatable::_frametime
protected

Definition at line 80 of file Animatable.hpp.

Referenced by getTime(), and setTime().

◆ _now

timeval Animatable::_now

Definition at line 69 of file Animatable.hpp.

◆ _numberFrame

int Animatable::_numberFrame

Definition at line 74 of file Animatable.hpp.

◆ _numberFrameToAnim

int Animatable::_numberFrameToAnim

Definition at line 72 of file Animatable.hpp.

◆ _startFrameIndex

int Animatable::_startFrameIndex

Definition at line 75 of file Animatable.hpp.

◆ sprite

std::shared_ptr<Drawable> Animatable::sprite
protected

Definition at line 79 of file Animatable.hpp.


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