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(); } }
public static void Clear() { tempTrail.Clear(); previewTrail.Clear(); }