RiftMayhem/Assets/Scripts/NPC/NPCControllers_v2/NPCAbilityPriorityManager.cs
Pedro Gomes a42b1ea784 Massive update on NPCs and damage over time effects
- NPC controller reworked completely
- ability priority list for npc's
- npc's with animations
- damage over time effect added
- burn, poison and bleed over time effects added
2024-07-19 21:57:47 +01:00

27 lines
682 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NPCAbilityPriorityManager : MonoBehaviour
{
public List<AbilityConditionManager> abilityPriorityList = new List<AbilityConditionManager>();
NPCControllerBase npcController;
private void Awake()
{
npcController = GetComponentInParent<NPCControllerBase>();
}
public BaseAbility GetHighestPriorityAvailableAbility()
{
for (int i = 0; i < abilityPriorityList.Count; i++)
{
if (abilityPriorityList[i].CanCastAbility(npcController))
return abilityPriorityList[i].ability;
}
return null;
}
}