AT and AP mine traits

This commit is contained in:
Paul Chote
2009-12-23 03:49:49 -08:00
parent eae88e7774
commit a9010d1947
8 changed files with 113 additions and 2 deletions

View File

@@ -239,6 +239,14 @@ namespace OpenRa.Game
{
return IsActorCrushableByMovementType(a, b.traits.WithInterface<IMovement>().FirstOrDefault().GetMovementType());
}
public static bool IsActorPathableToCrush(Actor a, UnitMovementType umt)
{
return a != null &&
a.traits.WithInterface<ICrushable>()
.Any(c => c.IsPathableCrush(umt, a.Owner));
}
public static bool IsActorCrushableByMovementType(Actor a, UnitMovementType umt)
{
return a != null &&