use the new actorinit stuff when loading map yaml

This commit is contained in:
Bob
2010-08-01 15:25:57 +12:00
parent 10b7ece62e
commit 970eb4d6e1
8 changed files with 104 additions and 28 deletions

View File

@@ -49,8 +49,11 @@ namespace OpenRA
public class LocationInit : IActorInit<int2>
{
[FieldFromYamlKey]
public readonly int2 value = int2.Zero;
public LocationInit() { }
public LocationInit( int2 init )
{
value = init;
@@ -64,9 +67,17 @@ namespace OpenRA
public class OwnerInit : IActorInit<Player>
{
[FieldFromYamlKey]
public readonly string PlayerName = "Neutral";
Player player;
public OwnerInit() { }
public OwnerInit( string playerName )
{
this.PlayerName = playerName;
}
public OwnerInit( Player player )
{
this.player = player;