Bomberman
Public Member Functions | Private Attributes | List of all members
BBM::AnimationsComponent Class Reference

#include <AnimationsComponent.hpp>

Inheritance diagram for BBM::AnimationsComponent:
Collaboration diagram for BBM::AnimationsComponent:

Public Member Functions

WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
size_t getCurrentAnimIndex () const
 get the current animation index More...
 
void setAnimIndex (int animIndex)
 Set the animation index to use. More...
 
size_t getCurrentAnimFrameCounter () const
 get animation frame counter More...
 
RAY::ModelAnimationgetCurrentModelAnim ()
 get the current More...
 
void setCurrentAnimFrameCounter (size_t animFrameCounter)
 set the anim frame counter More...
 
void resetCurrentAnimFrameCounter ()
 Set the internal anim counter to 0. More...
 
void incCurrentAnimFrameCounter ()
 Increment the internal anim counter. More...
 
void setAnimDisabled (bool disable)
 Allow to play pause animations. More...
 
bool isAnimDisabled () const
 To know if the animation will be updated or not. More...
 
 AnimationsComponent (WAL::Entity &entity, const std::string &path, int animIndex, bool play=true)
 ctor entity and the path of the animation file More...
 
 AnimationsComponent (const AnimationsComponent &)=default
 copy ctor More...
 
 ~AnimationsComponent () override=default
 dtor More...
 
AnimationsComponentoperator= (const AnimationsComponent &)=delete
 assignment operator More...
 
- Public Member Functions inherited from WAL::Component
Componentoperator= (const Component &)=delete
 A component can't be assigned. More...
 
virtual ~Component ()=default
 A virtual destructor. More...
 
virtual void onStart ()
 The entity or this component has just been enabled. More...
 
virtual void onStop ()
 The entity or this component has just been disable. More...
 

Private Attributes

RAY::ModelAnimations _modelAnimation
 To get the animation data. More...
 
int _currentAnimIndex
 The index of the. More...
 
bool _animDisabled
 Bool allowing to play pause an animation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::Component
 Component (Entity &entity)
 A component can't be instantiated, it should be derived. More...
 
 Component (const Component &)=default
 A component can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::Component
Entity_entity
 The entity that own this component. More...
 

Constructor & Destructor Documentation

◆ AnimationsComponent() [1/2]

BBM::AnimationsComponent::AnimationsComponent ( WAL::Entity entity,
const std::string &  path,
int  animIndex,
bool  play = true 
)
explicit

ctor entity and the path of the animation file

◆ AnimationsComponent() [2/2]

BBM::AnimationsComponent::AnimationsComponent ( const AnimationsComponent )
default

copy ctor

◆ ~AnimationsComponent()

BBM::AnimationsComponent::~AnimationsComponent ( )
overridedefault

dtor

Member Function Documentation

◆ clone()

WAL::Component * BBM::AnimationsComponent::clone ( WAL::Entity entity) const
overridevirtual

Clone a component for another or the same entity.

Parameters
entityThe entity that owns the ne component.

Implements WAL::Component.

◆ getCurrentAnimFrameCounter()

size_t BBM::AnimationsComponent::getCurrentAnimFrameCounter ( ) const

get animation frame counter

◆ getCurrentAnimIndex()

size_t BBM::AnimationsComponent::getCurrentAnimIndex ( ) const

get the current animation index

◆ getCurrentModelAnim()

RAY::ModelAnimation & BBM::AnimationsComponent::getCurrentModelAnim ( )

get the current

◆ incCurrentAnimFrameCounter()

void BBM::AnimationsComponent::incCurrentAnimFrameCounter ( )

Increment the internal anim counter.

◆ isAnimDisabled()

bool BBM::AnimationsComponent::isAnimDisabled ( ) const

To know if the animation will be updated or not.

◆ operator=()

AnimationsComponent& BBM::AnimationsComponent::operator= ( const AnimationsComponent )
delete

assignment operator

◆ resetCurrentAnimFrameCounter()

void BBM::AnimationsComponent::resetCurrentAnimFrameCounter ( )

Set the internal anim counter to 0.

◆ setAnimDisabled()

void BBM::AnimationsComponent::setAnimDisabled ( bool  disable)

Allow to play pause animations.

◆ setAnimIndex()

void BBM::AnimationsComponent::setAnimIndex ( int  animIndex)

Set the animation index to use.

◆ setCurrentAnimFrameCounter()

void BBM::AnimationsComponent::setCurrentAnimFrameCounter ( size_t  animFrameCounter)

set the anim frame counter

Member Data Documentation

◆ _animDisabled

bool BBM::AnimationsComponent::_animDisabled
private

Bool allowing to play pause an animation.

◆ _currentAnimIndex

int BBM::AnimationsComponent::_currentAnimIndex
private

The index of the.

◆ _modelAnimation

RAY::ModelAnimations BBM::AnimationsComponent::_modelAnimation
private

To get the animation data.


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