started working on the Player-Actor.

This commit is contained in:
Bob
2009-12-15 21:58:09 +13:00
parent 9e68f4fb9d
commit ca946ea7cf
8 changed files with 131 additions and 85 deletions

View File

@@ -50,9 +50,16 @@ namespace OpenRa.Game
public static void Initialize(string mapName, Renderer renderer, int2 clientSize, int localPlayer, bool useAftermath)
{
Rules.LoadRules(mapName, useAftermath);
world = new World();
for (int i = 0; i < 8; i++)
players[i] = new Player(i, i, "Multi{0}".F(i), Race.Soviet);
for( int i = 0 ; i < 8 ; i++ )
{
var a = new Actor( null, new int2( int.MaxValue, int.MaxValue ), null );
players[ i ] = new Player( a, i, i, "Multi{0}".F( i ), Race.Soviet );
a.Owner = players[ i ];
a.traits.Add( new Traits.ProductionQueue( a ) );
Game.world.Add( a );
}
localPlayerIndex = localPlayer;
@@ -64,7 +71,6 @@ namespace OpenRa.Game
SequenceProvider.Initialize(useAftermath);
viewport = new Viewport( clientSize, Rules.Map.Offset, Rules.Map.Offset + Rules.Map.Size, renderer );
world = new World();
Sound.Initialize();
BuildingInfluence = new BuildingInfluenceMap();