Owner-thread combat locomotion authority shared by player and navigation commands. 更多...
#include <CombatLocomotion.h>
Public 成员函数 | |
| CombatLocomotionRuntime ()=default | |
| Construct without an installed navigation provider. | |
| CombatLocomotionRuntime (ICombatNavigationProvider &provider) | |
| Construct borrowing a provider that must outlive this runtime or be cleared. | |
| void | setNavigationProvider (ICombatNavigationProvider &provider) noexcept |
| Install a borrowed provider; active goals remain owned by this runtime. | |
| void | clearNavigationProvider () noexcept |
| Remove the borrowed provider; advancing an active goal then fails observably. | |
| Result< void > | registerSubject (CombatLocomotionDefinition definition) |
| Register one unique subject from validated owning definition data. | |
| Result< void > | unregisterSubject (SubjectRef subject) |
| Remove one subject; missing subjects are rejected. | |
| Result< CombatLocomotionState > | state (SubjectRef subject) const |
| Return an owning state snapshot, or NotFound for a stale subject. | |
| Result< void > | setMoveIntent (SubjectRef subject, CombatVector2 direction, double speedFraction) |
| Set normalized player/AI movement and clear any navigation goal. | |
| Result< void > | navigateTo (SubjectRef subject, CombatNavigationGoal goal) |
| Install a navigation goal after provider and value validation. | |
| Result< void > | stop (SubjectRef subject) |
| Clear a navigation goal and desired movement for one subject. | |
| Result< CombatLocomotionAdvance > | advance (const SimulationStep &step) |
| Atomically advance every subject using only the supplied deterministic step. | |
| std::vector< CombatLocomotionState > | states () const |
| Return owning states in stable subject-id order. | |
详细描述
Owner-thread combat locomotion authority shared by player and navigation commands.
The runtime owns every mutable movement fact. Navigation is optional and borrowed; advance prepares all states before one publication, so a provider failure cannot leave a partially moved arena. No method reads a clock or RNG.
在文件 CombatLocomotion.h 第 125 行定义.
构造及析构函数说明
◆ CombatLocomotionRuntime() [1/2]
|
default |
Construct without an installed navigation provider.
◆ CombatLocomotionRuntime() [2/2]
|
inlineexplicit |
Construct borrowing a provider that must outlive this runtime or be cleared.
在文件 CombatLocomotion.h 第 130 行定义.
成员函数说明
◆ advance()
| Result< CombatLocomotionAdvance > eve::combat::CombatLocomotionRuntime::advance | ( | const SimulationStep & | step | ) |
Atomically advance every subject using only the supplied deterministic step.
在文件 CombatLocomotion.cpp 第 141 行定义.
引用了 eve::Applied, eve::combat::Arrived, eve::Diagnostic::error(), eve::combat::CombatLocomotionAdvance::events, eve::Result< T >::failure(), eve::InvalidArgument, key, length, eve::combat::Moved, previous, scale, state(), eve::combat::ICombatNavigationProvider::steer(), step, eve::Status::success(), eve::Result< T >::success(), eve::combat::CombatLocomotionAdvance::tick, eve::Unsupported, valid, eve::combat::CombatVector2::x , 以及 eve::Duration::zero().
◆ clearNavigationProvider()
|
inlinenoexcept |
Remove the borrowed provider; advancing an active goal then fails observably.
在文件 CombatLocomotion.h 第 135 行定义.
◆ navigateTo()
| Result< void > eve::combat::CombatLocomotionRuntime::navigateTo | ( | SubjectRef | subject, |
| CombatNavigationGoal | goal | ||
| ) |
Install a navigation goal after provider and value validation.
在文件 CombatLocomotion.cpp 第 114 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::NotFound, subject, eve::Status::success(), eve::Result< T >::success(), eve::Unsupported , 以及 valid.
◆ registerSubject()
| Result< void > eve::combat::CombatLocomotionRuntime::registerSubject | ( | CombatLocomotionDefinition | definition | ) |
Register one unique subject from validated owning definition data.
在文件 CombatLocomotion.cpp 第 65 行定义.
引用了 eve::AlreadyExists, eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), key, eve::Status::success(), eve::Result< T >::success() , 以及 valid.
◆ setMoveIntent()
| Result< void > eve::combat::CombatLocomotionRuntime::setMoveIntent | ( | SubjectRef | subject, |
| CombatVector2 | direction, | ||
| double | speedFraction | ||
| ) |
Set normalized player/AI movement and clear any navigation goal.
- 参数
-
subject Registered subject. direction Finite direction; non-unit input is normalized. speedFraction Requested fraction in [0,1].
在文件 CombatLocomotion.cpp 第 98 行定义.
引用了 eve::Applied, direction, eve::Diagnostic::error(), eve::Result< T >::failure(), finite, found, eve::InvalidArgument, length, eve::NotFound, subject, eve::Status::success() , 以及 eve::Result< T >::success().
◆ setNavigationProvider()
|
inlinenoexcept |
Install a borrowed provider; active goals remain owned by this runtime.
在文件 CombatLocomotion.h 第 133 行定义.
◆ state()
| Result< CombatLocomotionState > eve::combat::CombatLocomotionRuntime::state | ( | SubjectRef | subject | ) | const |
Return an owning state snapshot, or NotFound for a stale subject.
在文件 CombatLocomotion.cpp 第 87 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::InvalidArgument, eve::NotFound, subject , 以及 eve::Result< T >::success().
◆ states()
| std::vector< CombatLocomotionState > eve::combat::CombatLocomotionRuntime::states | ( | ) | const |
Return owning states in stable subject-id order.
在文件 CombatLocomotion.cpp 第 208 行定义.
◆ stop()
| Result< void > eve::combat::CombatLocomotionRuntime::stop | ( | SubjectRef | subject | ) |
Clear a navigation goal and desired movement for one subject.
在文件 CombatLocomotion.cpp 第 130 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), found, eve::NotFound, subject, eve::Status::success() , 以及 eve::Result< T >::success().
◆ unregisterSubject()
| Result< void > eve::combat::CombatLocomotionRuntime::unregisterSubject | ( | SubjectRef | subject | ) |
Remove one subject; missing subjects are rejected.
在文件 CombatLocomotion.cpp 第 78 行定义.
引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::NotFound, subject, eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/combat/CombatLocomotion.h
- src/modules/combat/CombatLocomotion.cpp