32 lines
907 B
C#
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;
|
|
|
|
}
|
|
|
|
}
|
|
}
|