Exemplo n.º 1
0
 private void OnGamerJoin(Gamer joined)
 {
     if (joined.IsLocal)
         myGamer = joined as LocalGamer;
 }
Exemplo n.º 2
0
 private void ClearGamer(Gamer gamer)
 {
     this.gamer = null;
     Wins = 0;
     Losses = 0;
 }
Exemplo n.º 3
0
 private void OnHostChanged(Gamer oldHost, Gamer newHost)
 {
     Engine.Instance.Scene = new MenuScene(MenuScene.ReturnState.Lobby);
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
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();
            }
        }