Exemplo n.º 1
0
    public void StartGame()
    {
        Vector3 position = Vector3.zero;

        foreach (Team team in instance.Teams.Values)
        {
            Boat boat = BoatManager.instance.SpawnBoat(team, position, Quaternion.identity);
            position.y += 3;

            foreach (Player player in team.Players.Values)
            {
                PirateManager.instance.SpawnPirate(player, boat);
            }
        }

        BoatManager.SendBoatsToPlayers();
        PirateManager.instance.SendPirates();

        using (Packet packet = new Packet((int)ServerPackets.gameStart))
        {
            ServerSend.SendTCPDataToAll(packet);
        }
    }