slowly teasing the view+controller out of the model classes.

actually doesn't work right now, but that will change.

git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@2050 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
chrisf
2008-07-25 07:27:47 +00:00
parent 4ea033f63d
commit b594f296c3
16 changed files with 400 additions and 115 deletions

View File

@@ -4,12 +4,12 @@ using System.Text;
namespace OpenRa.Game
{
interface IOrder
abstract class Order
{
void Apply( Game game );
public abstract void Apply( Game game );
}
class MoveOrder : IOrder
class MoveOrder : Order
{
public readonly Unit Unit;
public readonly int2 Destination;
@@ -20,13 +20,13 @@ namespace OpenRa.Game
this.Destination = destination;
}
public void Apply( Game game )
public override void Apply( Game game )
{
Unit.nextOrder = UnitMissions.Move( Unit, Destination );
}
}
class DeployMcvOrder : IOrder
class DeployMcvOrder : Order
{
Unit unit;
@@ -35,13 +35,13 @@ namespace OpenRa.Game
this.unit = unit;
}
public void Apply( Game game )
public override void Apply( Game game )
{
unit.nextOrder = UnitMissions.Deploy( unit );
}
}
class HarvestOrder : IOrder
class HarvestOrder : Order
{
Unit unit;
@@ -50,7 +50,7 @@ namespace OpenRa.Game
this.unit = unit;
}
public void Apply( Game game )
public override void Apply( Game game )
{
unit.nextOrder = UnitMissions.Harvest( unit );
}