- Add RoomStreamingManager to manage room loading and unloading based on player proximity. - Create StreamingBudgetConfigSO for memory and performance budgeting of the streaming system. - Introduce TransitionDirector to handle seamless and atmospheric fade transitions between rooms. - Develop WorldGraph to represent room connectivity and facilitate neighbor queries and distance calculations. - Implement RoomNode and RoomEdge classes to structure room data and connections.
49 lines
2.4 KiB
C#
49 lines
2.4 KiB
C#
namespace BaseGames.Enemies.Abilities
|
||
{
|
||
/// <summary>
|
||
/// 单段攻击数据(架构 07_EnemyModule §8.1)。
|
||
/// 描述"一次攻击"的所有要素:动画、HitBox 时机、伤害源、可选射弹。
|
||
/// EnemyAbilitySO.attackSequence 按顺序组合多段为完整能力。
|
||
/// </summary>
|
||
[UnityEngine.CreateAssetMenu(menuName = "BaseGames/Enemies/Enemy Attack", fileName = "EATK_")]
|
||
public class EnemyAttackSO : UnityEngine.ScriptableObject
|
||
{
|
||
[UnityEngine.Header("标识(仅调试用)")]
|
||
public string attackName = "Attack";
|
||
|
||
[UnityEngine.Header("动画")]
|
||
[UnityEngine.Tooltip("动画片段。若为空则跳过动画,按 fallbackDuration 推进。")]
|
||
public Animancer.ClipTransition clip;
|
||
[UnityEngine.Tooltip("clip 为空时本段总时长(秒)")]
|
||
public float fallbackDuration = 0.6f;
|
||
|
||
[UnityEngine.Header("HitBox 时机(归一化 0-1,相对动画长度)")]
|
||
[UnityEngine.Tooltip("HitBox 槽位名(在 MeleeAttackAbility 的 hitBoxSlots 中索引),为空表示无近战 HitBox")]
|
||
public string hitBoxSlot = "";
|
||
[UnityEngine.Range(0f, 1f)] public float hitBoxEnterT = 0.30f;
|
||
[UnityEngine.Range(0f, 1f)] public float hitBoxExitT = 0.55f;
|
||
|
||
[UnityEngine.Header("伤害源")]
|
||
public BaseGames.Combat.DamageSourceSO damageSource;
|
||
|
||
[UnityEngine.Header("射弹(远程能力使用)")]
|
||
public BaseGames.Combat.ProjectileConfigSO projectileConfig;
|
||
[UnityEngine.Min(1)] public int projectileCount = 1;
|
||
[UnityEngine.Range(0f, 180f)] public float spreadAngleDeg = 0f;
|
||
[UnityEngine.Tooltip("射弹生成时机(归一化)")]
|
||
[UnityEngine.Range(0f, 1f)] public float projectileFireT = 0.40f;
|
||
|
||
[UnityEngine.Header("段间衔接")]
|
||
[UnityEngine.Tooltip("本段结束后到下一段开始的延迟(秒)")]
|
||
public float postDelay = 0f;
|
||
[UnityEngine.Tooltip("本段是否锁定移动(设速度为0)")]
|
||
public bool lockMovement = true;
|
||
|
||
[UnityEngine.Header("可选霸体窗口")]
|
||
public bool hasPoiseWindow = false;
|
||
public BaseGames.Combat.PoiseLevel poiseLevel = BaseGames.Combat.PoiseLevel.Light;
|
||
[UnityEngine.Range(0f, 1f)] public float poiseStartT = 0.10f;
|
||
[UnityEngine.Range(0f, 1f)] public float poiseEndT = 0.55f;
|
||
}
|
||
}
|