use the new actorinit stuff when loading map yaml
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user