Symphony Of Empires
|
Roughly a batallion, consisting of approximately 500 soldiers each. More...
#include <unit.hpp>
Public Member Functions | |
float | attack (Unit &enemy) |
glm::vec2 | get_pos () const |
void | set_target (const Province &province) |
void | stop_movement () |
float | days_to_move_to (const Province &province) const |
bool | update_movement (UnitManager &unit_manager) |
void | set_owner (const Nation &nation) |
bool | can_move () const |
Checks if the unit can move (if it can set_province) More... | |
const std::vector< ProvinceId > | get_path () const |
void | set_path (const Province &target) |
bool | has_target_province () const |
ProvinceId | get_target_province_id () const |
float | get_strength () const |
ProvinceId | province_id () const |
Public Member Functions inherited from Entity< UnitId > | |
constexpr | Entity () noexcept=default |
constexpr | Entity (Entity &&) noexcept=default |
constexpr | Entity (const Entity &) noexcept=default |
constexpr Entity & | operator= (const Entity &) noexcept=default |
constexpr | ~Entity () noexcept=default |
constexpr bool | is_invalid () const |
Checks if the current id is invalid. More... | |
constexpr bool | is_valid () const |
Checks if the current id is valid. More... | |
constexpr | operator Id () const noexcept |
constexpr | operator size_t () const noexcept |
constexpr Id | get_id () const |
Public Attributes | |
UnitTypeId | type_id |
NationId | owner_id |
PopId | pop_id |
float | size = 0.f |
float | base = 0.f |
float | experience = 1.f |
bool | on_battle = false |
Public Attributes inherited from Entity< UnitId > | |
Id | cached_id |
Id used to speed up Id lookups on any context. More... | |
Friends | |
class | Client |
class | UnitManager |
struct | Eng3D::Deser::Serializer< Unit > |
Additional Inherited Members | |
Public Types inherited from Entity< UnitId > | |
using | Id = UnitId |
Static Public Member Functions inherited from Entity< UnitId > | |
constexpr static Id | invalid () |
Returns an invalid id. More... | |
constexpr static bool | is_invalid (Id id) |
Checks if the id is not valid. More... | |
constexpr static bool | is_valid (Id id) |
Checks if the id is valid. More... | |
Roughly a batallion, consisting of approximately 500 soldiers each.
float Unit::attack | ( | Unit & | enemy | ) |
|
inline |
float Unit::days_to_move_to | ( | const Province & | province | ) | const |
|
inline |
glm::vec2 Unit::get_pos | ( | ) | const |
|
inline |
|
inline |
ProvinceId Unit::province_id | ( | ) | const |
void Unit::set_owner | ( | const Nation & | nation | ) |
void Unit::set_path | ( | const Province & | target | ) |
void Unit::set_target | ( | const Province & | province | ) |
|
inline |
bool Unit::update_movement | ( | UnitManager & | unit_manager | ) |
|
friend |
|
friend |
UnitTypeId Unit::type_id |