Exemplo n.º 1
0
    void Update()
    {
        Assert.IsNotNull(connectionPrefab);

        if (connectionTask == null)
        {
            return;
        }

        if (connectionTask.IsCanceled || connectionTask.IsFaulted || (connectionTask.IsCompleted && connectionTask.Result == null))
        {
            connectPanel.SetStatusbarText("Failed.");
            connectionTask.Dispose();
            connectionTask = null;
            return;
        }

        if (!connectionTask.IsCompleted)
        {
            connectPanel.SetStatusbarText("Connecting...");
            Debug.Log("Connection task pending...");
            return;
        }

        OnConnectionTaskComplete();
    }
Exemplo n.º 2
0
    public override void Enter()
    {
        base.Enter();

        didReceiveResponse = false;

        Assert.IsNotNull(connectPanel);
        connectPanel.SetStatusbarText("Joining server...");
    }