generalising selection, issuing of orders
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1283 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -6,11 +6,23 @@ namespace OpenRa.Game
|
||||
{
|
||||
class MoveOrder
|
||||
{
|
||||
public readonly Mcv Unit;
|
||||
public readonly float2 Destination;
|
||||
|
||||
public MoveOrder(float2 destination)
|
||||
public MoveOrder( Mcv unit, int x, int y )
|
||||
: this( unit, new float2( x * 24, y * 24 ) )
|
||||
{
|
||||
this.Destination = destination - new float2(24,24); //HACK account for MCV size
|
||||
}
|
||||
|
||||
public MoveOrder(Mcv unit, float2 destination)
|
||||
{
|
||||
this.Unit = unit;
|
||||
this.Destination = destination;
|
||||
}
|
||||
|
||||
public void Apply()
|
||||
{
|
||||
Unit.Accept( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user