Exemplo n.º 1
0
 public Team(BeepLiveGame beepLiveGame, TeamConfig teamConfig)
 {
     BeepLiveGame = beepLiveGame;
     TeamConfig   = teamConfig;
     Players      = new List <Player>(teamConfig.MaxPlayers);
     VoxelType    = new VoxelType
     {
         OwnerTeam = this, Color = teamConfig.Color, Resistance = teamConfig.TerritoryResistance
     };
 }
Exemplo n.º 2
0
        public void HandleSyncPacket(SyncPacket packet)
        {
            BeepLiveGame = new BeepLiveGame(packet.BeepConfig, PlayerGuid);

            BeepLiveGame.Map.OnSimulationStop += () =>
                                                 Flow(PlayerFlowPacket.FlowType.FinishedSimulation);

            BeepGameState.Connecting = false;

            _physicsTimer = BeepLiveGame.Run(); // Simulating is false, so this doesn't run immediately

            TeamMocks = BeepLiveGame.Teams.Select(t => new TeamMock
            {
                TeamColor  = t.TeamConfig.Color,
                MaxPlayers = t.TeamConfig.MaxPlayers,
                TeamGuid   = t.TeamConfig.TeamGuid
            }).ToList();
            PlayerMocks = new List <PlayerMock>();
        }