- Necromancer class playable - Savage minion ability & npc - Mage minion ability & npc - rogue minion ability & npc - warrior minion ability & npc - golem minion ability & npc - minion abilities - Class resource (used to automatically summon minions based on the amount of souls drained, in case of necromancer) - class resource spender (auto cast from priority list) - class resource regen instant effect option
27 lines
659 B
C#
27 lines
659 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class ClassAbilityPriorityManager : MonoBehaviour
|
|
{
|
|
public List<ClassAbilityConditionManager> abilityPriorityList = new List<ClassAbilityConditionManager>();
|
|
|
|
RiftPlayer player;
|
|
|
|
private void Awake()
|
|
{
|
|
player = GetComponentInParent<RiftPlayer>();
|
|
}
|
|
|
|
public BaseAbility GetHighestPriorityAvailableAbility()
|
|
{
|
|
for (int i = 0; i < abilityPriorityList.Count; i++)
|
|
{
|
|
if (abilityPriorityList[i].CanCastAbility(player))
|
|
return abilityPriorityList[i].ability;
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|