added pathing debug

This commit is contained in:
Chris Forbes
2009-10-27 08:22:54 +13:00
parent 01a3fc5c62
commit ff26bd38c7
9 changed files with 107 additions and 67 deletions

View File

@@ -121,7 +121,7 @@ namespace OpenRa.Game.Traits
public CurrentActivity NextActivity { get; set; }
int2? destination;
List<int2> path;
public List<int2> path;
Func<Actor, Mobile, List<int2>> getPath;
MovePart move;
@@ -313,6 +313,13 @@ namespace OpenRa.Game.Traits
path.Clear();
NextActivity = null;
}
}
}
public IEnumerable<int2> GetCurrentPath()
{
var move = currentActivity as MoveTo;
if (move == null || move.path == null) return new int2[] { };
return Enumerable.Reverse(move.path);
}
}
}