git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1343 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
(no author)
2007-07-24 10:04:54 +00:00
parent fce2dcda8a
commit 60e6f36042
8 changed files with 50 additions and 16 deletions

View File

@@ -48,8 +48,8 @@ namespace OpenRa.Game
public void Build(SidebarItem item)
{
if( item != null )
game.world.orderGenerator = new PlaceBuilding( game.players[ 1 ], item.techTreeItem.tag.ToLowerInvariant() );
if (item != null)
game.world.orderGenerator = new PlaceBuilding(game.players[1], item.techTreeItem.tag.ToLowerInvariant());
}
void LoadSprites(string filename)
@@ -141,12 +141,18 @@ namespace OpenRa.Game
this.buildingName = buildingName;
}
public IOrder Order( int2 xy )
public IOrder Order( Game game, int2 xy )
{
game.world.uiOverlay.KillOverlay();
// todo: check that space is free
return new PlaceBuildingOrder( this, xy );
}
public void PrepareOverlay(Game game, int2 xy)
{
game.world.uiOverlay.SetCurrentOverlay(false, xy, 2, 3);
}
class PlaceBuildingOrder : IOrder
{
PlaceBuilding building;