private void OnGamerJoin(Gamer joined) { if (joined.IsLocal) myGamer = joined as LocalGamer; }
private void ClearGamer(Gamer gamer) { this.gamer = null; Wins = 0; Losses = 0; }
private void OnHostChanged(Gamer oldHost, Gamer newHost) { Engine.Instance.Scene = new MenuScene(MenuScene.ReturnState.Lobby); }
private void SetGamer(Gamer gamer) { LocalGamer local = gamer as LocalGamer; this.gamer = local; local[(int)TestProject.GamerProperties.ShipColor] = local[(int)TestProject.GamerProperties.Losses] = local[(int)TestProject.GamerProperties.Wins] = 0; }
private void OnGamerLeave(Gamer left) { foreach (var ship in Ships[left]) Ships.DestroyObjectLocal(ship); foreach (var bullet in Bombs[left]) Bombs.DestroyObjectLocal(bullet); if (Network.ActiveSession.NumGamers == 1 && Network.ActiveSession.IsHost) { quitToLobby = true; Network.ActiveSession.EndGame(); } }