remove one of the Move constructors

This commit is contained in:
Chris Forbes
2011-04-17 18:51:04 +12:00
committed by Paul Chote
parent 9541023456
commit 4f76876f05
3 changed files with 6 additions and 13 deletions

View File

@@ -462,7 +462,6 @@ namespace OpenRA.Mods.RA.Move
public Activity ScriptedMove(int2 cell) { return new Move(cell); }
public Activity MoveTo(int2 cell, int nearEnough) { return new Move(cell, nearEnough); }
public Activity MoveTo(int2 cell, Actor ignoredActor) { return new Move(cell, ignoredActor); }
public Activity MoveWithinRange(Actor target, int range) { return new Move(target, range); }
public Activity MoveWithinRange(Target target, int range) { return new Move(target, range); }
public Activity MoveTo(Func<List<int2>> pathFunc) { return new Move(pathFunc); }
}

View File

@@ -12,10 +12,10 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Mods.RA.Activities;
using OpenRA.Traits;
using OpenRA.Traits.Activities;
using OpenRA.FileFormats;
namespace OpenRA.Mods.RA.Move
{
@@ -58,15 +58,6 @@ namespace OpenRA.Mods.RA.Move
this.ignoreBuilding = ignoreBuilding;
}
public Move( Actor target, int range )
{
this.getPath = (self,mobile) => self.World.WorldActor.Trait<PathFinder>().FindUnitPathToRange(
mobile.toCell, target.Location,
range, self );
this.destination = null;
this.nearEnough = range;
}
public Move(Target target, int range)
{
this.getPath = (self,mobile) => self.World.WorldActor.Trait<PathFinder>().FindUnitPathToRange(