예제 #1
0
 public virtual void ValidateTargets()
 {
     if (true) //Find.TickManager.TicksGame % 60 == 0)
     {
         if (this.ParentSettlement == null)
         {
             FindParentSettlement(); //a null parent will destroy the object
         }
         //target is gone; return home
         if (this.DestinationTarget == null && !UseDestinationTile)
         {
             pather.StopDead();
             this.DestinationTarget = this.ParentSettlement;
             if (this.DestinationTarget == null)
             {
                 ReAssignParentSettlement();  //updates factions settlement lists; a null parent will destroy the object
             }
         }
         if (DestinationTarget != null && DestinationTarget.Tile != pather.Destination)
         {
             pather.StartPath(DestinationTarget.Tile, true, false);
         }
     }
 }
예제 #2
0
 public void PathToTarget(WorldObject wo)
 {
     pather.StartPath(wo.Tile, true);
     tweener.ResetTweenedPosToRoot();
 }