Checkpoint 5 & Checkpoint 6:
- SimulationWorld 只做逻辑计算与数据输出,不再直接写 Transform - 在 ShowEntitySuccess 中接入 Pickup/Projectile 占位注册: - Drop 走 UpsertPickup(...) - Bullet/Projectile 走 UpsertProjectile(...) - 在 HideEntityComplete 中接入对应回收: - Drop 走 RemovePickupByEntityId(...) - Bullet/Projectile 走 RemoveProjectileByEntityId(...) - 新增占位数据构造: - CreatePickupSimData(...) - CreateProjectileSimData(...) - 调整 EnemyManagerComponent 职责,现在只管“敌人相关”: - 敌人刷怪节奏 - 敌人列表缓存与计数 - 玩家引用与 enemy.SetTarget(...) - 新增嵌套类 SimulationWorld.Presentation,专门消费 EnemySimData 并回写 position/rotation - 新增嵌套类 SimulationWorld.EntitySync 负责“Simulation 同步”: - 监听 ShowEntitySuccess/HideEntityComplete - 同步 Enemy/Drop/Projectile 到 SimulationWorld - 敌人 SimData 构建、Pickup/Projectile 占位数据构建
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Simulation
|
||||
{
|
||||
public struct EnemySimData
|
||||
{
|
||||
public int EntityId;
|
||||
public Vector3 Position;
|
||||
public Vector3 Forward;
|
||||
public Quaternion Rotation;
|
||||
public float Speed;
|
||||
public float AttackRange;
|
||||
public bool AvoidEnemyOverlap;
|
||||
public float EnemyBodyRadius;
|
||||
public int SeparationIterations;
|
||||
public int TargetType;
|
||||
public int State;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef2eea85685544189eef2d9f2cece080
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,12 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Simulation
|
||||
{
|
||||
public struct PickupSimData
|
||||
{
|
||||
public int EntityId;
|
||||
public Vector3 Position;
|
||||
public float PickupRadius;
|
||||
public int State;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff6e8b75e4af4c3ca9e3b732b1383f95
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Simulation
|
||||
{
|
||||
public struct ProjectileSimData
|
||||
{
|
||||
public int EntityId;
|
||||
public int OwnerEntityId;
|
||||
public Vector3 Position;
|
||||
public Vector3 Forward;
|
||||
public float Speed;
|
||||
public float RemainingLifetime;
|
||||
public int State;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2eec1f4389004d69bdce8c4dd95d255e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user