Esempio n. 1
0
    public void ConnectToServer()
    {
        bool   isWaitInGame = Options.Get <bool>(Options.Keys.WaitInGame);
        IntPtr hWnd         = (IntPtr)null;

        if (isWaitInGame)
        {
            hWnd = LibLoader.GetForegroundWindow();
            LibLoader.ShowWindow(hWnd, 0);
        }

        Debug.Log($"connecting to {IPText.text} with {LibLoader.Connect(IPText.text, isWaitInGame ? 1 : 0)}");

        if (isWaitInGame)
        {
            LibLoader.ShowWindow(hWnd, 5);
        }
    }
Esempio n. 2
0
    public void LaunchServer(bool isTest, bool useBot)
    {
        IntPtr hWnd         = (IntPtr)null;
        bool   isWaitInGame = Options.Get <bool>(Options.Keys.WaitInGame);

        if (isWaitInGame)
        {
            hWnd = LibLoader.GetForegroundWindow();
            LibLoader.ShowWindow(hWnd, 0);
        }

        var rtn = LibLoader.LaunchServer(isTest ? 1 : 0, isWaitInGame ? 1 : 0, useBot ? 1 : 0);

        Debug.Log($"server launched with {rtn}");

        if (isWaitInGame)
        {
            LibLoader.ShowWindow(hWnd, 5);
        }
    }