StationObscurum/Assets/Scripts/Enemies/AI/AIV2/Strips/StripsGoal.cs

32 lines
907 B
C#
Raw Permalink Normal View History

2024-02-12 08:23:19 +01:00
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;
}
}
}