载入中...
搜索中...
未找到
eve::rpg::StoryEventSession类 参考

Caller-owned runtime cursor over a copied story-event definition. 更多...

#include <StoryEvent.h>

Public 成员函数

eve::Result< void > begin (const std::string &eventId, GameState *gameState)
 Begin or resume an event from its authoritative GameState cursor.
 
eve::Result< int > advance (GameState *gameState)
 Acknowledge the current presentation command and persist the next cursor atomically.
 
bool isActive () const
 Return whether a current step is awaiting acknowledgement.
 
bool isFinished () const
 Return whether this session acknowledged its final step.
 
int getStepIndex () const
 Return the zero-based current cursor, or the step count after completion.
 
int getStepCount () const
 Return the copied definition's total step count.
 
std::string getEventId () const
 Return an owning copy of the current event id.
 
std::string getStepKind () const
 Return the current command kind, or an empty string while inactive.
 
std::string getReference () const
 Return an owning copy of the current dialogue/message reference.
 
std::string getActorId () const
 Return an owning copy of the current move actor id.
 
double getX () const
 Return the current move/camera X coordinate, or zero while inactive.
 
double getY () const
 Return the current move/camera Y coordinate, or zero while inactive.
 
double getDuration () const
 Return the current wait/motion duration in seconds, or zero while inactive.
 

详细描述

Caller-owned runtime cursor over a copied story-event definition.

备注
GameState remains the sole owner of persistent cursor/completion facts. The session owns its definition copy so catalogue hot replacement cannot invalidate an active event.

在文件 StoryEvent.h 第 68 行定义.

成员函数说明

◆ advance()

eve::Result< int > eve::rpg::StoryEventSession::advance ( GameState *  gameState)

Acknowledge the current presentation command and persist the next cursor atomically.

参数
gameStateBorrowed owner used to persist progress; must be the same logical save.
返回
Remaining step count, or structured failure without cursor mutation.
备注
Acknowledging the final command persists completion before the session becomes inactive. @thread Call on the GameState owning simulation thread. @reentrancy No callbacks or scripts are invoked.

在文件 StoryEvent.cpp 第 236 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::rpg::GameState::getSelfVariable(), eve::rpg::GameState::hasSelfVariable(), eve::rpg::StoryEventDefinition::id, eve::InvalidArgument, eve::PreconditionViolation, scope, eve::rpg::GameState::setSelfVariable(), eve::rpg::StoryEventDefinition::steps, eve::Status::success() , 以及 eve::Result< T >::success().

◆ begin()

eve::Result< void > eve::rpg::StoryEventSession::begin ( const std::string &  eventId,
GameState *  gameState 
)

Begin or resume an event from its authoritative GameState cursor.

参数
eventIdExact registered event id.
gameStateBorrowed persistent state owner used only for this synchronous call.
返回
Applied/unchanged success, or a structured validation/conflict failure.
备注
Non-repeatable completed events reject restart. Failed begin leaves this session and GameState unchanged. @thread Call on the GameState owning simulation thread. @reentrancy No callbacks or scripts are invoked.

在文件 StoryEvent.cpp 第 194 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::rpg::StoryEventCatalogue::find(), eve::rpg::GameState::getSelfVariable(), eve::rpg::GameState::hasSelfVariable(), eve::InvalidArgument, eve::InvariantViolation, eve::NotFound, scope, eve::rpg::GameState::setSelfVariable(), eve::Status::success() , 以及 eve::Result< T >::success().

◆ getActorId()

std::string eve::rpg::StoryEventSession::getActorId ( ) const

Return an owning copy of the current move actor id.

在文件 StoryEvent.cpp 第 286 行定义.

引用了 step.

◆ getDuration()

double eve::rpg::StoryEventSession::getDuration ( ) const

Return the current wait/motion duration in seconds, or zero while inactive.

在文件 StoryEvent.cpp 第 298 行定义.

引用了 step.

◆ getEventId()

std::string eve::rpg::StoryEventSession::getEventId ( ) const

Return an owning copy of the current event id.

在文件 StoryEvent.cpp 第 277 行定义.

引用了 eve::rpg::StoryEventDefinition::id.

◆ getReference()

std::string eve::rpg::StoryEventSession::getReference ( ) const

Return an owning copy of the current dialogue/message reference.

在文件 StoryEvent.cpp 第 282 行定义.

引用了 step.

◆ getStepCount()

int eve::rpg::StoryEventSession::getStepCount ( ) const

Return the copied definition's total step count.

在文件 StoryEvent.cpp 第 276 行定义.

引用了 eve::rpg::StoryEventDefinition::steps.

◆ getStepIndex()

int eve::rpg::StoryEventSession::getStepIndex ( ) const

Return the zero-based current cursor, or the step count after completion.

在文件 StoryEvent.cpp 第 275 行定义.

◆ getStepKind()

std::string eve::rpg::StoryEventSession::getStepKind ( ) const

Return the current command kind, or an empty string while inactive.

在文件 StoryEvent.cpp 第 278 行定义.

引用了 step.

◆ getX()

double eve::rpg::StoryEventSession::getX ( ) const

Return the current move/camera X coordinate, or zero while inactive.

在文件 StoryEvent.cpp 第 290 行定义.

引用了 step.

◆ getY()

double eve::rpg::StoryEventSession::getY ( ) const

Return the current move/camera Y coordinate, or zero while inactive.

在文件 StoryEvent.cpp 第 294 行定义.

引用了 step.

◆ isActive()

bool eve::rpg::StoryEventSession::isActive ( ) const

Return whether a current step is awaiting acknowledgement.

在文件 StoryEvent.cpp 第 273 行定义.

◆ isFinished()

bool eve::rpg::StoryEventSession::isFinished ( ) const

Return whether this session acknowledged its final step.

在文件 StoryEvent.cpp 第 274 行定义.


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