- 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.
31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
#if GRAPH_DESIGNER
|
||
using Opsive.BehaviorDesigner.Runtime.Tasks;
|
||
using Opsive.BehaviorDesigner.Runtime.Tasks.Conditionals;
|
||
using BaseGames.Enemies;
|
||
|
||
namespace BaseGames.Enemies.AI
|
||
{
|
||
/// <summary>
|
||
/// BD Conditional Task:检查敌人本次 BT Tick 内是否发生了弹反事件。
|
||
///
|
||
/// 返回 <c>Success</c> 时同时清除标志(每次弹反只触发一次响应分支)。
|
||
/// 典型用法:在 BD 树根部优先分支放置此条件,触发时执行受击硬直 / 反制动画等子树。
|
||
/// </summary>
|
||
[TaskName("On Parried?")]
|
||
[TaskCategory("BaseGames/Enemy/Utility")]
|
||
[TaskDescription("检查上一次攻击是否被玩家格挡(用于 Boss 反制逻辑)")]
|
||
public class BD_OnParried : Conditional
|
||
{
|
||
private EnemyBase _enemy;
|
||
|
||
public override void OnAwake() => _enemy = GetComponent<EnemyBase>();
|
||
|
||
public override TaskStatus OnUpdate()
|
||
{
|
||
if (_enemy == null) return TaskStatus.Failure;
|
||
return _enemy.ConsumeParryEvent() ? TaskStatus.Success : TaskStatus.Failure;
|
||
}
|
||
}
|
||
}
|
||
#endif
|