载入中...
搜索中...
未找到
TacticsLineOfSightAdapter.h 文件参考

Grid line of sight for sensing consumers, answered from a bound tactics board. 更多...

#include "common/ECS.h"
#include "common/Result.h"
#include "sensing/Targeting.h"
#include "common/Export.h"

浏览源代码.

类

class  eve::tactics::TacticsLineOfSightAdapter
 Answers grid line-of-sight queries from the bound tactics battle. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::tactics
 

函数

TacticsLineOfSightAdapter & eve::tactics::tacticsLineOfSightAdapter ()
 The process-wide adapter instance the capability answers with.
 
Result< void > eve::tactics::registerTacticsLineOfSightProvider ()
 Claim the grid coordinate spaces for the tactics adapter.
 

详细描述

Grid line of sight for sensing consumers, answered from a bound tactics board.

The gap analysis flagged that sensing::TargetingResolver's LineOfSightMode::Required had no grid implementation at all: only a world-space physics probe existed, so a turn-based game could not ask the targeting pipeline "can this unit see that cell". This adapter supplies it from the board that actually owns a sight-blocking fact - tactics cells carry the persisted sight_blocker tag - instead of inventing a second blocking model somewhere else.

Shape, mirroring the physics adapter:

  • the adapter is registered once for the Grid2D/Grid3D spaces through sensing::LineOfSightRouter, so it does not displace the world-space provider;
  • it answers for one bound board at a time. Binding a second, different battle is a Conflict: a project must say which board the pipeline should see rather than getting an answer that depends on binding order;
  • the bound battle is held as an ECS handle, not a pointer: a battle that was released resolves to nothing, so a query reports Unsupported instead of dereferencing freed state;
  • a query before anything is bound is Unsupported, never "not visible".

在文件 TacticsLineOfSightAdapter.h 中定义.