// Use this for initialization
    void Start()
    {
        DontDestroyOnLoad(this);
        ServerTCP serverTCP = new ServerTCP();

        serverTCP.InitNetwork();
    }
Exemple #2
0
        static void SetupServer()
        {
            Console.WriteLine("Starting Server...");

            ServerTCP.LoadJsonGameRules();
            Types.TempPlayer = new Types.TempPlayerRec[Constants.GAMERULES.MAX_PLAYER_COUNT];

            ServerTCP.InitNetwork();
            ServerHandleData.Init();

            for (int i = 0; i < Constants.GAMERULES.MAX_PLAYER_COUNT; i++)
            {
                ServerTCP.Clients[i] = new Client();
                Types.TempPlayer[i]  = new Types.TempPlayerRec();
            }
        }