载入中...
搜索中...
未找到
eve::combat::CombatLocomotionRuntime类 参考

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]

eve::combat::CombatLocomotionRuntime::CombatLocomotionRuntime ( )
default

Construct without an installed navigation provider.

◆ CombatLocomotionRuntime() [2/2]

eve::combat::CombatLocomotionRuntime::CombatLocomotionRuntime ( ICombatNavigationProvider &  provider)
inlineexplicit

Construct borrowing a provider that must outlive this runtime or be cleared.

在文件 CombatLocomotion.h 第 130 行定义.

成员函数说明

◆ advance()

◆ clearNavigationProvider()

void eve::combat::CombatLocomotionRuntime::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 
)

◆ 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.

参数
subjectRegistered subject.
directionFinite direction; non-unit input is normalized.
speedFractionRequested 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()

void eve::combat::CombatLocomotionRuntime::setNavigationProvider ( ICombatNavigationProvider &  provider)
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().

被这些函数引用 advance() , 以及 states().

◆ states()

std::vector< CombatLocomotionState > eve::combat::CombatLocomotionRuntime::states ( ) const

Return owning states in stable subject-id order.

在文件 CombatLocomotion.cpp 第 208 行定义.

引用了 key , 以及 state().

◆ 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)

该类的文档由以下文件生成: