载入中...
搜索中...
未找到
eve::rts::MatchSystem类 参考

Match command and simulation boundary. 更多...

#include <RTSMatch.h>

静态 Public 成员函数

static Result< void > addParticipant (Match &match, Faction &faction, int team)
 Add one live faction before match start.
 
static Result< void > addObjective (Match &match, MissionObjectiveSpec objective)
 Register one campaign objective while the match is in setup. @cost Linear in existing objectives for duplicate-id checks.
 
static Result< void > start (Match &match)
 Validate rules/participants/objectives and transition Setup to Running.
 
static Result< void > surrender (Match &match, Faction &faction)
 Eliminate a participant and all of its live RTS entities.
 
static Result< void > creditScore (Match &match, int team, double amount)
 Credit a finite team score while the match is running. @cost Linear in the number of score entries (typically team count).
 
static Result< double > teamScore (Match &match, int team) noexcept
 Read one team's match-owned score; missing teams return 0.
 
static Result< std::size_t > step (Match &match, const SimulationStep &step={}, const MatchResourceQuery &resources={})
 Advance the match clock, evaluate objectives/victory, and settle a winner or draw.
 
static Result< std::size_t > step (Match &match, const MatchResourceQuery &resources)
 Evaluate victory without advancing the match clock.
 

详细描述

Match command and simulation boundary.

在文件 RTSMatch.h 第 19 行定义.

成员函数说明

◆ addObjective()

Result< void > eve::rts::MatchSystem::addObjective ( Match &  match,
MissionObjectiveSpec  objective 
)
static

Register one campaign objective while the match is in setup. @cost Linear in existing objectives for duplicate-id checks.

在文件 RTSMatch.cpp 第 510 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), left, eve::rts::Pending, eve::rts::MissionObjectiveSpec::requiredSubjects, right, eve::rts::Setup, eve::Status::success(), eve::Result< T >::success() , 以及 value.

被这些函数引用 eve::rts::RTS::addMatchObjective().

◆ addParticipant()

Result< void > eve::rts::MatchSystem::addParticipant ( Match &  match,
Faction &  faction,
int  team 
)
static

◆ creditScore()

Result< void > eve::rts::MatchSystem::creditScore ( Match &  match,
int  team,
double  amount 
)
static

Credit a finite team score while the match is running. @cost Linear in the number of score entries (typically team count).

在文件 RTSMatch.cpp 第 604 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound , 以及 eve::rts::Running.

被这些函数引用 eve::rts::RTS::creditMatchScore().

◆ start()

◆ step() [1/2]

Result< std::size_t > eve::rts::MatchSystem::step ( Match &  match,
const MatchResourceQuery &  resources 
)
static

Evaluate victory without advancing the match clock.

在文件 RTSMatch.cpp 第 627 行定义.

引用了 resources , 以及 step.

◆ step() [2/2]

Result< std::size_t > eve::rts::MatchSystem::step ( Match &  match,
const SimulationStep &  step = {},
const MatchResourceQuery &  resources = {} 
)
static

Advance the match clock, evaluate objectives/victory, and settle a winner or draw.

参数
stepFixed simulation tick/delta used for elapsed time and control-point accrual.
resourcesRequired for ResourceTarget races, timed resource settlement, and ReachResource objectives. @cost Linear in participants, objectives, and held control-point buildings when score accrual is enabled.

在文件 RTSMatch.cpp 第 631 行定义.

引用了 eve::Applied, changed, eve::rts::DestroyHeadquarters, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::rts::Finished, eve::rts::Mission, eve::NoOp, objectives, eve::PreconditionViolation, resources, eve::rts::ResourceTarget, eve::rts::Running, eve::rts::ScoreTarget, step, eve::Status::success(), eve::Result< T >::success() , 以及 value.

◆ surrender()

Result< void > eve::rts::MatchSystem::surrender ( Match &  match,
Faction &  faction 
)
static

Eliminate a participant and all of its live RTS entities.

在文件 RTSMatch.cpp 第 590 行定义.

引用了 eve::Applied, eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::NotFound, eve::rts::Running, eve::Status::success() , 以及 eve::Result< T >::success().

被这些函数引用 eve::rts::RTS::surrenderMatch().

◆ teamScore()

Result< double > eve::rts::MatchSystem::teamScore ( Match &  match,
int  team 
)
staticnoexcept

Read one team's match-owned score; missing teams return 0.

在文件 RTSMatch.cpp 第 622 行定义.

引用了 eve::Applied, eve::Status::success() , 以及 eve::Result< T >::success().


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