![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Convenience struct that owns all the components required for a battle and resolves some boilerplate setup. This is the top level object. More...
#include <Battle.hpp>
Public Types | |
enum class | Type { WildPeoplemon , Trainer , Online } |
Represents the different types of battles. Affects only the intro. More... | |
Public Member Functions | |
void | setController (std::unique_ptr< BattleController > &&controller) |
Sets and initializes the controller to use in battle. More... | |
Static Public Member Functions | |
static std::unique_ptr< Battle > | create (bl::engine::Engine &engine, const std::string &location, system::Player &player, Type type) |
Creates the battle struct and initializes the player battler. More... | |
Public Attributes | |
const std::string | location |
system::Player & | player |
const Type | type |
BattleState | state |
std::unique_ptr< BattleController > | controller |
BattleView | view |
Result | result |
Convenience struct that owns all the components required for a battle and resolves some boilerplate setup. This is the top level object.
Definition at line 23 of file Battle.hpp.
|
strong |
Represents the different types of battles. Affects only the intro.
Enumerator | |
---|---|
WildPeoplemon | |
Trainer | |
Online |
Definition at line 25 of file Battle.hpp.
|
static |
Creates the battle struct and initializes the player battler.
engine | The game engine instance |
location | The name of the map, town, or route where the battle is taking place |
player | The player data |
type | The type of battle this is |
Definition at line 42 of file Battle.cpp.
void core::battle::Battle::setController | ( | std::unique_ptr< BattleController > && | controller | ) |
Sets and initializes the controller to use in battle.
controller | The battle controller to use |
Definition at line 55 of file Battle.cpp.
std::unique_ptr<BattleController> core::battle::Battle::controller |
Definition at line 50 of file Battle.hpp.
const std::string core::battle::Battle::location |
Definition at line 46 of file Battle.hpp.
system::Player& core::battle::Battle::player |
Definition at line 47 of file Battle.hpp.
Result core::battle::Battle::result |
Definition at line 52 of file Battle.hpp.
BattleState core::battle::Battle::state |
Definition at line 49 of file Battle.hpp.
const Type core::battle::Battle::type |
Definition at line 48 of file Battle.hpp.
BattleView core::battle::Battle::view |
Definition at line 51 of file Battle.hpp.