Пример #1
0
    //Ready
    public void ReadyButton()
    {
        if (m_readyButton.sprite == m_sprReady_normal)
        {
            NetworkManager.Instance().SendOrderMessage(
                JSONMessageTool.ToJsonOrderUserReady(true, GameManager.Instance().PLAYER.NETWORK_INDEX));
            m_readyButton.sprite = m_sprReady_setting;

            GetRush(m_playerList[GameManager.Instance().PLAYER.NETWORK_INDEX - 2]).SetActive(true);
            GetRushName(m_playerList[GameManager.Instance().PLAYER.NETWORK_INDEX - 2]).text =
                GameManager.Instance().PLAYER.USER_NAME;
        }
        else
        {
            GetRush(m_playerList[GameManager.Instance().PLAYER.NETWORK_INDEX - 2]).SetActive(false);
            NetworkManager.Instance().SendOrderMessage(
                JSONMessageTool.ToJsonOrderUserReady(false, GameManager.Instance().PLAYER.NETWORK_INDEX));
            m_readyButton.sprite = m_sprReady_normal;
        }
    }