- 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
27 lines
682 B
C#
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;
|
|
}
|
|
}
|