载入中...
搜索中...
未找到
eve::tactics::InteractionContext结构体 参考

Immutable projection of everything the interaction machine is allowed to know. 更多...

#include <Interaction.h>

Public 属性

BattleStatus status = BattleStatus::Setup
 
BattlePhase phase = BattlePhase::Setup
 
SubjectRef activeUnit
 The unit currently allowed to act, or an invalid subject when none is.
 
SubjectRef controlledUnit
 The unit this session drives. An invalid subject means "observe only".
 
Cell controlledCell
 Cell of the controlled unit, used to recognise a click on the unit itself.
 
std::vector< Cell > reachableCells
 Destinations the controlled unit may legally move to.
 
std::vector< Cell > targetableCells
 Cells where an armed ability may legally land.
 
std::map< Cell, SubjectRef > unitsByCell
 Unit occupying each cell, for turning a targeted cell into a targeted unit.
 
Revision revision
 The revision the caller observed when it built this context.
 

详细描述

Immutable projection of everything the interaction machine is allowed to know.

备注
This is a value, built by the caller from its own authoritative query results — reachable, cellsInRange, observe. The machine therefore has no way to reach into the battle: a UI cannot accidentally commit through it, and the same context can be replayed to reproduce a click sequence exactly. A context the caller cannot compute (for example reachability of a blocked unit) is expressed by leaving the corresponding set empty, which the machine reads as "no legal destination" rather than as an error.

在文件 Interaction.h 第 98 行定义.

类成员变量说明

◆ activeUnit

SubjectRef eve::tactics::InteractionContext::activeUnit

The unit currently allowed to act, or an invalid subject when none is.

在文件 Interaction.h 第 102 行定义.

◆ controlledCell

Cell eve::tactics::InteractionContext::controlledCell

Cell of the controlled unit, used to recognise a click on the unit itself.

在文件 Interaction.h 第 106 行定义.

◆ controlledUnit

SubjectRef eve::tactics::InteractionContext::controlledUnit

The unit this session drives. An invalid subject means "observe only".

在文件 Interaction.h 第 104 行定义.

◆ phase

BattlePhase eve::tactics::InteractionContext::phase = BattlePhase::Setup

在文件 Interaction.h 第 100 行定义.

◆ reachableCells

std::vector<Cell> eve::tactics::InteractionContext::reachableCells

Destinations the controlled unit may legally move to.

在文件 Interaction.h 第 108 行定义.

◆ revision

Revision eve::tactics::InteractionContext::revision

The revision the caller observed when it built this context.

在文件 Interaction.h 第 114 行定义.

◆ status

BattleStatus eve::tactics::InteractionContext::status = BattleStatus::Setup

在文件 Interaction.h 第 99 行定义.

被这些函数引用 eve::tactics::Tactics::interactionContext().

◆ targetableCells

std::vector<Cell> eve::tactics::InteractionContext::targetableCells

Cells where an armed ability may legally land.

在文件 Interaction.h 第 110 行定义.

◆ unitsByCell

std::map<Cell, SubjectRef> eve::tactics::InteractionContext::unitsByCell

Unit occupying each cell, for turning a targeted cell into a targeted unit.

在文件 Interaction.h 第 112 行定义.


该结构体的文档由以下文件生成: