![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Set of behaviors for NPCs and trainers. More...
#include <Behavior.hpp>
Classes | |
struct | Path |
Contains data for when the behavior type is following a path. More... | |
struct | Spinning |
Contains data for when the behavior type is SpinInPlace. More... | |
struct | Standing |
Contains data if the behavior type is StandStill. More... | |
struct | Wander |
Contains data for when the behavior type is Wandering. More... | |
Public Types | |
enum | Type : std::uint8_t { StandStill = 0 , SpinInPlace = 1 , FollowingPath = 2 , Wandering = 3 } |
The type of behavior. More... | |
Public Member Functions | |
Behavior () | |
Empty behavior. Standing still facing down. More... | |
bool | legacyLoad (bl::serial::binary::InputStream &input) |
Loads the behavior data from the legacy formatted file. Use serialize and deserialize for reading and writing the new format. More... | |
Type | type () const |
The type of behavior this is. More... | |
void | setType (Type type) |
Set the Type of behavior. Existing behavior data is cleared. More... | |
Standing & | standing () |
The data for standing still. More... | |
Spinning & | spinning () |
The data for spinning. More... | |
Path & | path () |
The data for path following. More... | |
Wander & | wander () |
The data for wandering. More... | |
const Standing & | standing () const |
The data for standing still. More... | |
const Spinning & | spinning () const |
The data for spinning. More... | |
const Path & | path () const |
The data for path following. More... | |
const Wander & | wander () const |
The data for wandering. More... | |
Friends | |
struct | bl::serial::binary::Serializer< Behavior > |
struct | bl::serial::SerializableObject< Behavior > |
Set of behaviors for NPCs and trainers.
Definition at line 19 of file Behavior.hpp.
enum core::file::Behavior::Type : std::uint8_t |
The type of behavior.
Definition at line 22 of file Behavior.hpp.
core::file::Behavior::Behavior | ( | ) |
Empty behavior. Standing still facing down.
Definition at line 9 of file Behavior.cpp.
bool core::file::Behavior::legacyLoad | ( | bl::serial::binary::InputStream & | input | ) |
Loads the behavior data from the legacy formatted file. Use serialize and deserialize for reading and writing the new format.
input | The input file |
Definition at line 13 of file Behavior.cpp.
Behavior::Path & core::file::Behavior::path | ( | ) |
The data for path following.
Definition at line 110 of file Behavior.cpp.
const Behavior::Path & core::file::Behavior::path | ( | ) | const |
The data for path following.
Definition at line 112 of file Behavior.cpp.
void core::file::Behavior::setType | ( | Type | type | ) |
Set the Type of behavior. Existing behavior data is cleared.
type | The type of behavior to set to |
Definition at line 77 of file Behavior.cpp.
Behavior::Spinning & core::file::Behavior::spinning | ( | ) |
The data for spinning.
Definition at line 106 of file Behavior.cpp.
const Behavior::Spinning & core::file::Behavior::spinning | ( | ) | const |
The data for spinning.
Definition at line 108 of file Behavior.cpp.
Behavior::Standing & core::file::Behavior::standing | ( | ) |
The data for standing still.
Definition at line 102 of file Behavior.cpp.
const Behavior::Standing & core::file::Behavior::standing | ( | ) | const |
The data for standing still.
Definition at line 104 of file Behavior.cpp.
Behavior::Type core::file::Behavior::type | ( | ) | const |
The type of behavior this is.
Definition at line 75 of file Behavior.cpp.
Behavior::Wander & core::file::Behavior::wander | ( | ) |
The data for wandering.
Definition at line 114 of file Behavior.cpp.
const Behavior::Wander & core::file::Behavior::wander | ( | ) | const |
The data for wandering.
Definition at line 116 of file Behavior.cpp.
|
friend |
Definition at line 194 of file Behavior.hpp.
|
friend |
Definition at line 194 of file Behavior.hpp.