예제 #1
0
 public Node(Node parent, float runningCost, HashSet <KeyValuePair <GOAP.ActionKey, object> > state, GOAP.Action action)
 {
     this.parent      = parent;
     this.runningCost = runningCost;
     this.state       = state;
     this.action      = action;
 }
예제 #2
0
 public Node(Node parent, float cost, Dictionary <string, int> allStates, GOAP.Action action)
 {
     this.parent = parent;
     this.cost   = cost;
     this.state  = new Dictionary <string, int>(allStates);
     this.action = action;
 }
예제 #3
0
        private HashSet <GOAP.Action> ActionSubset(HashSet <GOAP.Action> actions, GOAP.Action toRemove)
        {
            HashSet <GOAP.Action> subset = new HashSet <GOAP.Action>();

            foreach (GOAP.Action action in actions)
            {
                if (!action.Equals(toRemove))
                {
                    _ = subset.Add(action);
                }
            }
            return(subset);
        }