StationObscurum/Assets/Scripts/Enemies/AI/AIV2/Strips/StripsGoal.cs
2024-02-12 02:23:19 -05:00

32 lines
907 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace STRIPS
{
[CreateAssetMenu(fileName = "New Goal", menuName = "STRIPS/Create New Goal", order = 3)]
public class StripsGoal : ScriptableObject
{
public string goalName;
public StripsAction[] actions;
private List<StripsAction> available;
public List<StripsAction> Available { get { return available; } }
public void UpdateActionConditionals(StripsVariableMapping.PackageMapping updatedMappings)
{
List<StripsAction> available = new List<StripsAction> ();
for(int i =0; i < actions.Length; i++)
{
if (actions[i].EvaluateConditionals(updatedMappings))
{
available.Add(actions[i]);
}
}
this.available=available;
}
}
}