Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Member Functions | List of all members
core::system::Trainers Class Reference

This system manages trainers. It handles their vision and makes them walk up to the player. More...

#include <Trainers.hpp>

+ Inheritance diagram for core::system::Trainers:

Public Member Functions

 Trainers (Systems &owner)
 Construct a new Trainers system. More...
 
virtual ~Trainers ()=default
 Destroys the system. More...
 
bl::ecs::Entity approachingTrainer () const
 Returns the trainer currently approaching the player. More...
 
void resetDefeated ()
 Resets the list of defeated trainers. More...
 
bool trainerDefeated (const component::Trainer &trainer) const
 Checks whether or not the given trainer has been defeated. More...
 
void setDefeated (component::Trainer &trainer)
 Sets the given trainer as having been defeated and updates the game save data. More...
 

Detailed Description

This system manages trainers. It handles their vision and makes them walk up to the player.

Definition at line 28 of file Trainers.hpp.

Constructor & Destructor Documentation

◆ Trainers()

core::system::Trainers::Trainers ( Systems owner)

Construct a new Trainers system.

Parameters
ownerThe main game systems

Definition at line 21 of file Trainers.cpp.

◆ ~Trainers()

virtual core::system::Trainers::~Trainers ( )
virtualdefault

Destroys the system.

Member Function Documentation

◆ approachingTrainer()

bl::ecs::Entity core::system::Trainers::approachingTrainer ( ) const

Returns the trainer currently approaching the player.

Returns
bl::ecs::Entity

Definition at line 105 of file Trainers.cpp.

◆ resetDefeated()

void core::system::Trainers::resetDefeated ( )

Resets the list of defeated trainers.

Definition at line 200 of file Trainers.cpp.

◆ setDefeated()

void core::system::Trainers::setDefeated ( component::Trainer trainer)

Sets the given trainer as having been defeated and updates the game save data.

Parameters
trainerThe trainer to mark defeated

Definition at line 111 of file Trainers.cpp.

◆ trainerDefeated()

bool core::system::Trainers::trainerDefeated ( const component::Trainer trainer) const

Checks whether or not the given trainer has been defeated.

Parameters
trainerThe trainer to test
Returns
True if defeated, false if not

Definition at line 107 of file Trainers.cpp.


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