保留 Tick 作为唯一入口,但让 SimulationWorld 只做 orchestration
- Tick 仍然是唯一仿真入口。SimulationWorld 顶层现在只保留全局开关、bridge 服务和生命周期入口,原来散落在类上的大部分跨域状态已经从 SimulationWorld 收口到新的 SimulationWorld.RuntimeModules。 - 新的 runtime modules 把状态按域分成了 SimulationStateStore、JobDataRuntimeState、CollisionPipelineRuntimeState、TargetSelectionRuntimeState,并通过同名代理把现有 partial 的调用面基本保持不变。 - CollisionPipeline 和 target-selection 的配置也一起下沉到了运行时模块。为了避免现有反射型测试立刻失效,保留了 _collisionQueryInputs 和 _areaCollisionRequests 这两个顶层兼容字段。
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
using Unity.Jobs;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Simulation
|
||||
{
|
||||
public sealed partial class SimulationWorld
|
||||
@@ -9,37 +6,5 @@ namespace Simulation
|
||||
// Request buffering, broad-phase scheduling, resolve, and presentation
|
||||
// dispatch live in dedicated partial files under Jobs/.
|
||||
private const int PlayerEntityId = -1;
|
||||
private JobHandle _collisionCandidateQueryHandle;
|
||||
private bool _collisionCandidateQueryScheduled;
|
||||
|
||||
[Header("Projectile Collision Query")]
|
||||
[Tooltip("Projectile broad-phase collision query radius.")]
|
||||
[SerializeField]
|
||||
private float _projectileCollisionQueryRadius = 0.35f;
|
||||
|
||||
[Tooltip("Maximum retained candidates per projectile query.")]
|
||||
[SerializeField]
|
||||
private int _projectileMaxCandidatesPerQuery = 1;
|
||||
|
||||
[Tooltip("Broad-phase bucket cell size. <=0 derives from query radius.")]
|
||||
[SerializeField]
|
||||
private float _projectileCollisionCellSize = 0f;
|
||||
|
||||
[Header("Projectile Hit Event Dispatch")]
|
||||
[Tooltip("Dispatch projectile hit presentation event.")]
|
||||
[SerializeField]
|
||||
private bool _dispatchProjectileHitPresentationEvent = true;
|
||||
|
||||
[Tooltip("Request hit marker when projectile hits.")]
|
||||
[SerializeField]
|
||||
private bool _dispatchProjectileHitMarkerEvent = true;
|
||||
|
||||
[Tooltip("Request hit effect when projectile hits.")]
|
||||
[SerializeField]
|
||||
private bool _dispatchProjectileHitEffectEvent = true;
|
||||
|
||||
[Tooltip("Default hit effect entity type id in presentation event. 0 means not specified.")]
|
||||
[SerializeField]
|
||||
private int _projectileHitPresentationEffectTypeId = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user