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

#include <AnimationsSystem.hpp>

Inheritance diagram for BBM::AnimationsSystem:
Collaboration diagram for BBM::AnimationsSystem:

Public Member Functions

void onUpdate (WAL::ViewEntity< Drawable3DComponent, AnimationsComponent > &entity, std::chrono::nanoseconds dtime) override
 
void onSelfUpdate (std::chrono::nanoseconds dtime) override
 A method called after all entities that this system manage has been updated. More...
 
 AnimationsSystem (WAL::Wal &wal)
 A default constructor. More...
 
 AnimationsSystem (const AnimationsSystem &)=default
 A Controllable system is copy constructable. More...
 
 ~AnimationsSystem () override=default
 A default destructor. More...
 
AnimationsSystemoperator= (const AnimationsSystem &)=delete
 A system is not assignable. More...
 
- Public Member Functions inherited from WAL::System< Drawable3DComponent, AnimationsComponent >
 ~System () override=default
 A virtual, default, destructor. More...
 
 System (System &&) noexcept=default
 A system can be moved. More...
 
View< Dependencies... > & getView () override
 Get a view of all entities containing every dependencies of this system. More...
 
virtual void onUpdate (ViewEntity< Dependencies... > &entity, std::chrono::nanoseconds dtime)
 Update the corresponding component of the given entity. More...
 
virtual void onFixedUpdate (ViewEntity< Dependencies... > &entity)
 An alternative of onUpdate that is called every 8ms (120 times per seconds). If the system slow down, it will try to catch up. More...
 
void update (std::chrono::nanoseconds dtime) final
 Update the whole system (every entities that this system is responsible can be updated. More...
 
void fixedUpdate () final
 An alternative of update that is called every 8ms (120 times per seconds). If the system slow down, it will try to catch up. More...
 
- Public Member Functions inherited from WAL::ISystem
virtual ~ISystem ()=default
 A virtual default destructor. More...
 

Private Attributes

long maxAnimsToSkip = 4
 used to reset animsToskip More...
 
long animsToSkip = maxAnimsToSkip
 Should the next update call be skipped? More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::System< Drawable3DComponent, AnimationsComponent >
 System (Wal &wal)
 A system can't be instantiated, it should be derived. More...
 
 System (const System &)=default
 A system can't be instantiated, it should be derived. More...
 
Systemoperator= (const System &)=default
 A system can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::System< Drawable3DComponent, AnimationsComponent >
Wal_wal
 A reference to the ECS. More...
 

Constructor & Destructor Documentation

◆ AnimationsSystem() [1/2]

BBM::AnimationsSystem::AnimationsSystem ( WAL::Wal wal)
explicit

A default constructor.

◆ AnimationsSystem() [2/2]

BBM::AnimationsSystem::AnimationsSystem ( const AnimationsSystem )
default

A Controllable system is copy constructable.

◆ ~AnimationsSystem()

BBM::AnimationsSystem::~AnimationsSystem ( )
overridedefault

A default destructor.

Member Function Documentation

◆ onSelfUpdate()

void BBM::AnimationsSystem::onSelfUpdate ( std::chrono::nanoseconds  dtime)
overridevirtual

A method called after all entities that this system manage has been updated.

Parameters
dtimeThe delta time.

Reimplemented from WAL::System< Drawable3DComponent, AnimationsComponent >.

◆ onUpdate()

void BBM::AnimationsSystem::onUpdate ( WAL::ViewEntity< Drawable3DComponent, AnimationsComponent > &  entity,
std::chrono::nanoseconds  dtime 
)
override

◆ operator=()

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

A system is not assignable.

Member Data Documentation

◆ animsToSkip

long BBM::AnimationsSystem::animsToSkip = maxAnimsToSkip
private

Should the next update call be skipped?

◆ maxAnimsToSkip

long BBM::AnimationsSystem::maxAnimsToSkip = 4
private

used to reset animsToskip


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