Move Selection into a Trait
This commit is contained in:
@@ -155,7 +155,7 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
public readonly Selection Selection;
|
||||
public readonly ISelection Selection;
|
||||
|
||||
public void CancelInputMode() { OrderGenerator = new UnitOrderGenerator(); }
|
||||
|
||||
@@ -193,8 +193,7 @@ namespace OpenRA
|
||||
WorldActor = CreateActor(worldActorType, new TypeDictionary());
|
||||
ActorMap = WorldActor.Trait<IActorMap>();
|
||||
ScreenMap = WorldActor.Trait<ScreenMap>();
|
||||
|
||||
Selection = new Selection(WorldActor.TraitsImplementing<INotifySelection>());
|
||||
Selection = WorldActor.Trait<ISelection>();
|
||||
|
||||
// Add players
|
||||
foreach (var cmp in WorldActor.TraitsImplementing<ICreatePlayers>())
|
||||
|
||||
Reference in New Issue
Block a user