// +++ event handler ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public async void OnLoginAsPlayerClicked(int playerId)
    {
        Debug.Log("OnLoginAsPlayerClicked called");

        // invoke event to show waiting screen
        _sceneManager.LoadScene("menuWaiting");

        // Wait for the networkmanger to connect the player
        await _networkManager.LoginPlayerAsync(playerId);

        // then invoke event to open match options
        _sceneManager.LoadScene("menuMatchOptions");
    }
Ejemplo n.º 2
0
    // +++ event handler ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public async void OnSaveClicked()
    {
        Debug.Log("OnSaveClicked called");

        UpdateLocalPlayerPrefs();

        await UpdateServerSettings();

        _sceneManager.LoadScene("menuMain");
    }
    // +++ event handler ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public void OnMatchMakerClicked()
    {
        Debug.Log("OnMatchMakerClicked  called");

        _sceneManager.LoadScene("menuMatchMaking");
    }
Ejemplo n.º 4
0
    // +++ event handler ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    public async void OnJoinMatchClicked()
    {
        await _networkManager.JoinMatchAsync();

        _sceneManager.LoadScene("gameMain");
    }