Checkpoint 3 & Checkpoint 4:
- GameStateBattle 接入 Simulation 主更新入口 - SimulationWorld 增加开关 UseSimulationMovement(默认 false) - SimulationWorld.Tick(...) 现在在开关开启时执行敌人追踪/移动模拟,基本还原 MovementComponent 功能(敌人互斥) - 调整 IEnemySeparationSolver 系列方法,不再依赖 MovementComponent
This commit is contained in:
@@ -9,4 +9,10 @@ public abstract class EnemyBase : TargetableObject
|
||||
public abstract override ImpactData GetImpactData();
|
||||
|
||||
public virtual void SetTarget(Transform target) => _target = target;
|
||||
}
|
||||
|
||||
protected bool IsSimulationMovementEnabled()
|
||||
{
|
||||
var simulationWorld = GameEntry.SimulationWorld;
|
||||
return simulationWorld != null && simulationWorld.UseSimulationMovement;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,11 @@ namespace Entity
|
||||
|
||||
protected override void OnUpdate(float elapseSeconds, float realElapseSeconds)
|
||||
{
|
||||
if (IsSimulationMovementEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
base.OnUpdate(elapseSeconds, realElapseSeconds);
|
||||
|
||||
if (_target == null)
|
||||
|
||||
@@ -50,6 +50,11 @@ namespace Entity
|
||||
|
||||
protected override void OnUpdate(float elapseSeconds, float realElapseSeconds)
|
||||
{
|
||||
if (IsSimulationMovementEnabled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
base.OnUpdate(elapseSeconds, realElapseSeconds);
|
||||
|
||||
if (_target == null)
|
||||
|
||||
Reference in New Issue
Block a user