Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        status_txt.text = srv_comm.GetStateDesc();

        lock (attack_msg)
        {
            attack_txt.text = attack_msg;
        }
        ServerComm.ConnState conn_state = srv_comm.GetState();
        if (conn_state == ServerComm.ConnState.CONNECTED)
        {
            attack_btn.interactable  = true;
            connect_btn.interactable = false;
        }
        else
        {
            if (conn_state == ServerComm.ConnState.CONNECTING)
            {
                connect_btn.interactable = false;
            }
            else
            {
                connect_btn.interactable = true;
            }
            attack_btn.interactable = false;
        }
    }