Move Selection into a Trait

This commit is contained in:
Evgeniy S
2019-05-16 16:15:32 +03:00
committed by reaperrr
parent 6723306bb4
commit 3a30b013a5
14 changed files with 55 additions and 33 deletions

View File

@@ -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>())