Esempio n. 1
0
 /**
  * Run the action.
  * Returns True if the action performed successfully or false
  * if something happened and it can no longer perform. In this case
  * the action queue should clear out and the goal cannot be reached.
  */
 public abstract bool Perform(GameObject agent, GoapMemory memory);
Esempio n. 2
0
 /**
  * This function checks the closest path from one action to another
  */
 public virtual bool CheckDistance(GameObject obj, GoapMemory memory)
 {
     return(false);
 }
Esempio n. 3
0
 /**
  * Procedurally check if this action can run. Not all actions
  * will need this, but some might.
  */
 public abstract bool CheckProceduralPrecondition(GameObject agent, GoapMemory memory);
Esempio n. 4
0
 protected override void Awake()
 {
     base.Awake();
     goal.Set <float>(WorldStates.STATE_FLOAT_SATURATION, 1f);
     memory = GetComponent <GoapMemory>();
 }
Esempio n. 5
0
 public void AddData(GoapMemory memory, string key, object value)
 {
     memory.AddData(key, value);
 }
Esempio n. 6
0
 public void AddWorldObjectsData(GoapMemory memory, string key, string objectType)
 {
     memory.AddWorldData(key, WorldData.GetData(objectType));
 }