Beispiel #1
0
    public void exitLevel(string sceneName)
    {
        UserLogoutEvent logOut = new UserLogoutEvent();

        logOut.Send();
        SceneManager.LoadScene(sceneName);
    }
Beispiel #2
0
    // Run on exit of application. Logs the user out of the server and closes the websocket
    public void OnApplicationQuit()
    {
        UserLogoutEvent logout = new UserLogoutEvent();

        logout.Send();

        log("Closing!!");
        if (w != null && w.connected)
        {
            w.Close();
        }
    }
    public void OnApplicationQuit()
    {
        UserLogoutEvent logout = new UserLogoutEvent();

        logout.Send();

        FlowEvent closeEvent = new FlowEvent();

        closeEvent.command = -1;
        CommandProcessor.sendCommand(closeEvent);
        Debug.Log("Closing!!");
        if (w != null && w.connected)
        {
            w.Close();
        }
    }