feat: Implement Room Streaming System
- 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.
This commit is contained in:
32
Assets/_Game/Scripts/Enemies/AI/BD_InterruptAbility.cs
Normal file
32
Assets/_Game/Scripts/Enemies/AI/BD_InterruptAbility.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
#if GRAPH_DESIGNER
|
||||
using UnityEngine;
|
||||
using Opsive.BehaviorDesigner.Runtime.Tasks;
|
||||
using Opsive.BehaviorDesigner.Runtime.Tasks.Actions;
|
||||
using BaseGames.Enemies.Abilities;
|
||||
|
||||
namespace BaseGames.Enemies.AI
|
||||
{
|
||||
/// <summary>动作:中断指定能力。</summary>
|
||||
[TaskName("Interrupt Ability")]
|
||||
[TaskCategory("BaseGames/Enemy/Combat")]
|
||||
[TaskDescription("立即中断指定能力或全部能力")]
|
||||
public sealed class BD_InterruptAbility : Action
|
||||
{
|
||||
[SerializeField] private string m_AbilityId = "";
|
||||
[SerializeField] private InterruptReason m_Reason = InterruptReason.ExternalRequest;
|
||||
|
||||
private EnemyBase _enemy;
|
||||
|
||||
public override void OnAwake() => _enemy = gameObject.GetComponent<EnemyBase>();
|
||||
|
||||
public override TaskStatus OnUpdate()
|
||||
{
|
||||
if (_enemy == null) return TaskStatus.Failure;
|
||||
var ab = _enemy.Abilities.Get(m_AbilityId);
|
||||
if (ab == null) return TaskStatus.Failure;
|
||||
ab.Interrupt(m_Reason);
|
||||
return TaskStatus.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user