void OnJoinedGame(object sender, CommandEventArgs args) { JoinedGameEventArgs e = args as JoinedGameEventArgs; Debug.Assert(e != null); Debug.Assert(ChampionsInfo != null && Match != null); bool leftIsAlly = e.OurData.Team == Teams.Left; bool rightIsAlly = !leftIsAlly; // Add the structures here so we can specify if they're friendly or not. // Left side AddStructure(new DrawableBase(Match.LeftStructures.Base, leftIsAlly)); AddStructure(new DrawableTower(Match.LeftStructures.BaseTower, leftIsAlly)); AddStructure(new DrawableTower(Match.LeftStructures.BottomTower, leftIsAlly)); AddStructure(new DrawableTower(Match.LeftStructures.TopTower, leftIsAlly)); // Right side AddStructure(new DrawableBase(Match.RightStructures.Base, rightIsAlly)); AddStructure(new DrawableTower(Match.RightStructures.BaseTower, rightIsAlly)); AddStructure(new DrawableTower(Match.RightStructures.BottomTower, rightIsAlly)); AddStructure(new DrawableTower(Match.RightStructures.TopTower, rightIsAlly)); AddChampionToGame(e.OurData, true); PlayChampionReviveSound(); // play our champion's spawn sound foreach (PlayerData remote in e.RemotePlayers) { AddChampionToGame(remote, false); } }
private void OnJoinedGame(object sender, JoinedGameEventArgs e) => DialogManager.Dismiss(this);