Entity-local RTS effect component backed by the canonical adapter. 更多...
#include <RTSEffects.h>
Public 成员函数 | |
| eve::Result< void > | bindSubject (eve::SubjectRef subject) |
| Bind the owning entity subject before applying effects. | |
| eve::Result< effects::EffectHandle > | apply (const RTSEffectDefinition &definition) |
| Apply a typed RTS effect to this entity's canonical lifecycle. | |
| eve::Result< void > | remove (effects::EffectHandle handle) |
| Remove one generation-qualified effect handle. | |
| eve::Result< RTSEffectUpdate > | advance (const eve::SimulationStep &step) |
| Advance this entity's effect lifecycle and settle domain state. | |
| std::size_t | count () const noexcept |
| Return active effect count. | |
| RTSEffectSnapshot | snapshot () const |
| Capture the canonical effect lifecycle and RTS target projection. | |
| eve::Result< void > | restore (const RTSEffectSnapshot &value) |
| Atomically restore the canonical effect lifecycle and RTS target projection. | |
| void | restoreSchedulerTick (eve::SimulationTick tick) noexcept |
| Align the lifecycle scheduler with an owning world checkpoint. | |
| RTSEffectTarget & | target () noexcept |
| Return the mutable RTS target state owned by this component. | |
| const RTSEffectTarget & | target () const noexcept |
| Return the read-only RTS target state owned by this component. | |
| double | multiplier (std::string_view field) const noexcept |
| Return a composed active status multiplier. | |
| double | additive (std::string_view field) const noexcept |
| Return a composed active additive status value. | |
详细描述
Entity-local RTS effect component backed by the canonical adapter.
The component owns no second effect store. Its subject binding is established by the RTS facade when the entity is created; systems advance this component with the same injected SimulationStep used by the rest of the RTS world.
在文件 RTSEffects.h 第 118 行定义.
成员函数说明
◆ additive()
|
inlinenoexcept |
Return a composed active additive status value.
在文件 RTSEffects.h 第 143 行定义.
◆ advance()
| eve::Result< RTSEffectUpdate > eve::rts::RTSEffectComponent::advance | ( | const eve::SimulationStep & | step | ) |
Advance this entity's effect lifecycle and settle domain state.
在文件 RTSEffects.cpp 第 193 行定义.
引用了 eve::rts::RTSEffectAdapter::advance() , 以及 step.
◆ apply()
| eve::Result< effects::EffectHandle > eve::rts::RTSEffectComponent::apply | ( | const RTSEffectDefinition & | definition | ) |
Apply a typed RTS effect to this entity's canonical lifecycle.
在文件 RTSEffects.cpp 第 184 行定义.
引用了 eve::rts::RTSEffectAdapter::apply(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument , 以及 eve::SubjectRef::isValid().
◆ bindSubject()
| eve::Result< void > eve::rts::RTSEffectComponent::bindSubject | ( | eve::SubjectRef | subject | ) |
Bind the owning entity subject before applying effects.
在文件 RTSEffects.cpp 第 172 行定义.
引用了 eve::Applied, eve::Conflict, eve::rts::RTSEffectAdapter::count(), eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::SubjectRef::isValid(), subject, eve::Status::success() , 以及 eve::Result< T >::success().
◆ count()
|
inlinenoexcept |
Return active effect count.
在文件 RTSEffects.h 第 129 行定义.
◆ multiplier()
|
inlinenoexcept |
Return a composed active status multiplier.
在文件 RTSEffects.h 第 141 行定义.
◆ remove()
| eve::Result< void > eve::rts::RTSEffectComponent::remove | ( | effects::EffectHandle | handle | ) |
Remove one generation-qualified effect handle.
在文件 RTSEffects.cpp 第 191 行定义.
引用了 handle , 以及 eve::rts::RTSEffectAdapter::remove().
◆ restore()
|
inline |
Atomically restore the canonical effect lifecycle and RTS target projection.
在文件 RTSEffects.h 第 133 行定义.
引用了 value.
◆ restoreSchedulerTick()
|
inlinenoexcept |
Align the lifecycle scheduler with an owning world checkpoint.
- 参数
-
tick Completed tick.
在文件 RTSEffects.h 第 135 行定义.
引用了 tick.
◆ snapshot()
|
inline |
Capture the canonical effect lifecycle and RTS target projection.
在文件 RTSEffects.h 第 131 行定义.
◆ target() [1/2]
|
inlinenoexcept |
Return the read-only RTS target state owned by this component.
在文件 RTSEffects.h 第 139 行定义.
◆ target() [2/2]
|
inlinenoexcept |
Return the mutable RTS target state owned by this component.
在文件 RTSEffects.h 第 137 行定义.
该类的文档由以下文件生成:
- src/modules/rts/RTSEffects.h
- src/modules/rts/RTSEffects.cpp