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

A component to slowly center entities to the middle of their current block. This allow flexibility in their movement will preventing them from getting stuck at every corner. More...

#include <GridCenteredComponent.hpp>

Inheritance diagram for BBM::GridCenteredComponent:
Collaboration diagram for BBM::GridCenteredComponent:

Public Member Functions

Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
 GridCenteredComponent (WAL::Entity &entity)
 Create a new, default GridCenteredComponent. More...
 
 GridCenteredComponent (const GridCenteredComponent &other)=default
 A GridCenteredComponent is copy constructable. More...
 
 ~GridCenteredComponent () override=default
 A default destructor. More...
 
GridCenteredComponentoperator= (const GridCenteredComponent &)=delete
 A GridCenteredComponent is not assignable. 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...
 

Public Attributes

float force = 1
 The force factor applied at each frame. 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...
 

Detailed Description

A component to slowly center entities to the middle of their current block. This allow flexibility in their movement will preventing them from getting stuck at every corner.

Constructor & Destructor Documentation

◆ GridCenteredComponent() [1/2]

BBM::GridCenteredComponent::GridCenteredComponent ( WAL::Entity entity)
explicit

Create a new, default GridCenteredComponent.

Parameters
entityThe entity attached to this component.

◆ GridCenteredComponent() [2/2]

BBM::GridCenteredComponent::GridCenteredComponent ( const GridCenteredComponent other)
default

A GridCenteredComponent is copy constructable.

Parameters
otherThe other GridCenteredComponent to copy.

◆ ~GridCenteredComponent()

BBM::GridCenteredComponent::~GridCenteredComponent ( )
overridedefault

A default destructor.

Member Function Documentation

◆ clone()

WAL::Component * BBM::GridCenteredComponent::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.

◆ operator=()

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

A GridCenteredComponent is not assignable.

Member Data Documentation

◆ force

float BBM::GridCenteredComponent::force = 1

The force factor applied at each frame.


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