コード例 #1
0
ファイル: PlayerUnit.cs プロジェクト: bjornt16/GoblinGuru
 private void ResetTurn()
 {
     currentMovePoints = MaxMovePoints;
     //health -= 5;
     //stamina -= 10;
     UpdateUI();
     if (pathTrail != null)
     {
         pathTrail.CalculateTurns(this);
         pathTrail.ShowPath();
     }
 }
コード例 #2
0
ファイル: Pathfinder.cs プロジェクト: bjornt16/GoblinGuru
 public static void PreviewPath(PlayerUnit player, GameTile fromTile, GameTile toTile)
 {
     Clear();
     tempTrail.Clear();
     tempTrail = GetPathTrail(player, (player.PathTrail != null ? player.PathTrail.PathTo.Tile.PathTile : fromTile.PathTile), toTile.PathTile);
     if (tempTrail != null)
     {
         if (player.PathTrail != null)
         {
             previewTrail = new PathTrail(player.PathTrail);
             previewTrail.extendPath(tempTrail);
         }
         else
         {
             previewTrail = tempTrail;
         }
         previewTrail.CalculateTurns(player);
         previewTrail.ShowPath();
     }
     else
     {
         tempTrail = new PathTrail();
     }
 }