Beispiel #1
0
 private void OnDisable()
 {
     if (GoapWorldManager.GetInstance())
     {
         GoapWorldManager.GetInstance().RemoveObject(this);
     }
 }
 public override void InitPlanning(GoapPlanner.PlanningData _planningData)
 {
     base.InitPlanning(_planningData);
     objectTarget = GoapWorldManager.GetInstance().QueryClosestObjectWithID(queryObjectsID, objectTag, _planningData.agentPositonXZ, out sqrDistanceToTarget);
     objectTag    = queryObjectTag.GetHashCode();
 }
Beispiel #3
0
 private void OnEnable()
 {
     GoapWorldManager.GetInstance().AddObject(this);
     positionCache   = this.transform.position;
     positionCacheXZ = Shared.MathUtil.GetVectorXZ(positionCache);
 }