Creepy-simulation
 
Loading...
Searching...
No Matches
CreepersManager Class Reference

Manages a collection of creeper entities and their interactions. More...

#include <CreepersManager.hpp>

Public Member Functions

 CreepersManager (std::shared_ptr< CreepersParams > params)
 Constructs a CreepersManager object.
 
void beginAndFindSteves (const std::vector< std::shared_ptr< Steve > > &steves)
 Initializes creepers and associates them with nearby Steves.
 
const decltype(creepers_) & getCreepers () const
 Provides constant access to the collection of all creepers.
 
void walk ()
 Executes the walking behavior for all creepers.
 
void refreshActives ()
 Refreshes the list of active creepers.
 
template<typename Units >
void interactWith (Units units)
 Allows creepers to interact with a collection of other units.
 

Public Attributes

friend Simulation
 

Protected Member Functions

decltype(creepers_) & getCreepersRef ()
 Provides access to the collection of all creepers.
 

Detailed Description

Manages a collection of creeper entities and their interactions.

Constructor & Destructor Documentation

◆ CreepersManager()

CreepersManager::CreepersManager ( std::shared_ptr< CreepersParams params)

Constructs a CreepersManager object.

Parameters
paramsShared pointer to creeper parameters.

Member Function Documentation

◆ beginAndFindSteves()

void CreepersManager::beginAndFindSteves ( const std::vector< std::shared_ptr< Steve > > &  steves)

Initializes creepers and associates them with nearby Steves.

Parameters
stevesA vector of shared pointers to Steve objects.

◆ getCreepers()

const decltype(creepers_) & CreepersManager::getCreepers ( ) const
inline

Provides constant access to the collection of all creepers.

Returns
Constant reference to the vector of creepers.

◆ getCreepersRef()

decltype(creepers_) & CreepersManager::getCreepersRef ( )
inlineprotected

Provides access to the collection of all creepers.

Returns
Reference to the vector of creepers.

◆ interactWith()

template<typename Units >
void CreepersManager::interactWith ( Units  units)
inline

Allows creepers to interact with a collection of other units.

Template Parameters
UnitsA collection of unit objects.
Parameters
unitsThe units with which the creepers interact.

◆ refreshActives()

void CreepersManager::refreshActives ( )

Refreshes the list of active creepers.

◆ walk()

void CreepersManager::walk ( )

Executes the walking behavior for all creepers.

Member Data Documentation

◆ Simulation

friend CreepersManager::Simulation

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