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()
|
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()
|
static |
Add one live faction before match start.
在文件 RTSMatch.cpp 第 497 行定义.
引用了 eve::Applied, eve::rts::EntityLink< FactionLinkTag >::bind(), eve::Conflict, eve::Diagnostic::error(), eve::Result< T >::failure(), link, eve::rts::Setup, eve::Status::success() , 以及 eve::Result< T >::success().
被这些函数引用 eve::rts::RTS::addMatchParticipant().
◆ creditScore()
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()
Validate rules/participants/objectives and transition Setup to Running.
在文件 RTSMatch.cpp 第 533 行定义.
引用了 eve::Applied, eve::Conflict, eve::rts::DestroyHeadquarters, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::rts::Mission, eve::PreconditionViolation, eve::rts::ResourceTarget, eve::rts::Running, eve::rts::ScoreTarget, eve::rts::Setup, eve::StaleHandle, eve::Status::success(), eve::Result< T >::success(), value , 以及 eve::Duration::zero().
被这些函数引用 eve::rts::RTS::startMatch().
◆ step() [1/2]
|
static |
Evaluate victory without advancing the match clock.
在文件 RTSMatch.cpp 第 627 行定义.
◆ step() [2/2]
|
static |
Advance the match clock, evaluate objectives/victory, and settle a winner or draw.
- 参数
-
step Fixed simulation tick/delta used for elapsed time and control-point accrual. resources Required 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()
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()
Read one team's match-owned score; missing teams return 0.
在文件 RTSMatch.cpp 第 622 行定义.
引用了 eve::Applied, eve::Status::success() , 以及 eve::Result< T >::success().
该类的文档由以下文件生成:
- src/modules/rts/RTSMatch.h
- src/modules/rts/RTSMatch.cpp