updated sequences, and some small fixes

This commit is contained in:
Bob
2009-10-09 18:09:30 +13:00
parent 88a2fb50b4
commit 382ff42397
3 changed files with 81 additions and 6 deletions

View File

@@ -17,12 +17,16 @@ namespace OpenRa.Game
this.game = game;
}
public void WorldClicked(object sender, MouseEventArgs e)
public void WorldClicked( object sender, MouseEventArgs e )
{
var xy = (1 / 24.0f) * (new float2(e.Location) + game.viewport.Location);
if (orderGenerator != null)
orderGenerator.Order(game, new int2((int)xy.X, (int)xy.Y)).Apply(game);
// todo: route all orders through netcode
var xy = ( 1 / 24.0f ) * ( new float2( e.Location ) + game.viewport.Location );
if( orderGenerator != null )
{
var order = orderGenerator.Order( game, new int2( (int)xy.X, (int)xy.Y ) );
if( order != null )
order.Apply( game );
}
}
}
}