Skip to main content

ScorePoolComponent Class

Component that associates an entity with a score pool. More...

Declaration

class helios::engine::mechanics::scoring::components::ScorePoolComponent { ... }

Public Constructors Index

ScorePoolComponent ()=default
ScorePoolComponent (const ScorePoolComponent &other)

Copy constructor. More...

ScorePoolComponent (ScorePoolComponent &&) noexcept=default

Public Operators Index

ScorePoolComponent &operator= (const ScorePoolComponent &)=default
ScorePoolComponent &operator= (ScorePoolComponent &&) noexcept=default

Public Member Functions Index

boolisEnabled () const noexcept

Checks whether this component is enabled. More...

voidenable () noexcept

Enables this component. More...

voiddisable () noexcept

Disables this component. More...

voidsetScorePoolId (const helios::engine::mechanics::scoring::types::ScorePoolId scorePoolId) noexcept

Sets the associated score pool. More...

helios::engine::mechanics::scoring::types::ScorePoolIdscorePoolId () const noexcept

Returns the associated score pool ID. More...

Private Member Attributes Index

helios::engine::mechanics::scoring::types::ScorePoolIdscorePoolId_ {helios::core::types::no_init}

ID of the associated score pool. More...

boolisEnabled_ = true

Whether this component is enabled. More...

Description

Component that associates an entity with a score pool.

Attached to entities (e.g., player) to specify which score pool receives points when that entity performs scoring actions.

Definition at line 24 of file ScorePoolComponent.ixx.

Public Constructors

ScorePoolComponent()

helios::engine::mechanics::scoring::components::ScorePoolComponent::ScorePoolComponent ()
default

Definition at line 64 of file ScorePoolComponent.ixx.

Referenced by operator=, operator=, ScorePoolComponent and ScorePoolComponent.

ScorePoolComponent()

helios::engine::mechanics::scoring::components::ScorePoolComponent::ScorePoolComponent (const ScorePoolComponent & other)
inline

Copy constructor.

Parameters
other

The component to copy from.

Definition at line 71 of file ScorePoolComponent.ixx.

71 ScorePoolComponent(const ScorePoolComponent& other) : scorePoolId_(other.scorePoolId_) {}

Reference ScorePoolComponent.

ScorePoolComponent()

helios::engine::mechanics::scoring::components::ScorePoolComponent::ScorePoolComponent (ScorePoolComponent &&)
noexcept default

Definition at line 74 of file ScorePoolComponent.ixx.

Reference ScorePoolComponent.

Public Operators

operator=()

ScorePoolComponent & helios::engine::mechanics::scoring::components::ScorePoolComponent::operator= (const ScorePoolComponent &)
default

Definition at line 73 of file ScorePoolComponent.ixx.

Reference ScorePoolComponent.

operator=()

ScorePoolComponent & helios::engine::mechanics::scoring::components::ScorePoolComponent::operator= (ScorePoolComponent &&)
noexcept default

Definition at line 75 of file ScorePoolComponent.ixx.

Reference ScorePoolComponent.

Public Member Functions

disable()

void helios::engine::mechanics::scoring::components::ScorePoolComponent::disable ()
inline noexcept

Disables this component.

Definition at line 60 of file ScorePoolComponent.ixx.

60 void disable() noexcept {
61 isEnabled_ = false;
62 }

enable()

void helios::engine::mechanics::scoring::components::ScorePoolComponent::enable ()
inline noexcept

Enables this component.

Definition at line 53 of file ScorePoolComponent.ixx.

53 void enable() noexcept {
54 isEnabled_ = true;
55 }

isEnabled()

bool helios::engine::mechanics::scoring::components::ScorePoolComponent::isEnabled ()
inline nodiscard noexcept

Checks whether this component is enabled.

Returns

True if enabled, false otherwise.

Definition at line 46 of file ScorePoolComponent.ixx.

46 [[nodiscard]] bool isEnabled() const noexcept {
47 return isEnabled_;
48 }

scorePoolId()

helios::engine::mechanics::scoring::types::ScorePoolId helios::engine::mechanics::scoring::components::ScorePoolComponent::scorePoolId ()
inline nodiscard noexcept

Returns the associated score pool ID.

Returns

The ScorePoolId.

Definition at line 91 of file ScorePoolComponent.ixx.

92 return scorePoolId_;
93 }

Referenced by setScorePoolId.

setScorePoolId()

void helios::engine::mechanics::scoring::components::ScorePoolComponent::setScorePoolId (const helios::engine::mechanics::scoring::types::ScorePoolId scorePoolId)
inline noexcept

Sets the associated score pool.

Parameters
scorePoolId

The ID of the score pool.

Definition at line 82 of file ScorePoolComponent.ixx.

82 void setScorePoolId(const helios::engine::mechanics::scoring::types::ScorePoolId scorePoolId) noexcept {
83 scorePoolId_ = scorePoolId;
84 }

References scorePoolId and setScorePoolId.

Referenced by setScorePoolId.

Private Member Attributes

isEnabled_

bool helios::engine::mechanics::scoring::components::ScorePoolComponent::isEnabled_ = true

Whether this component is enabled.

Definition at line 36 of file ScorePoolComponent.ixx.

36 bool isEnabled_ = true;

scorePoolId_

helios::engine::mechanics::scoring::types::ScorePoolId helios::engine::mechanics::scoring::components::ScorePoolComponent::scorePoolId_ {helios::core::types::no_init}

ID of the associated score pool.

Definition at line 31 of file ScorePoolComponent.ixx.


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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.