Пример #1
0
    /// <summary>
    /// SelectedField上のカードを送信する。
    /// </summary>
    public void SendCards()
    {
        List <int> IDList = new List <int>();

        foreach (Transform childtransform in SelectedField.transform)
        {
            IDList.Add(childtransform.gameObject.GetComponent <Card>().Id);
        }

        //送信成功
        bool IsSuccessed = netWorkManager.Request(NetWorkManager.RequestParameter.Select, string.Join(",", IDList));

        if (IsSuccessed)
        {
            FieldClear(SelectedField);
        }
    }
Пример #2
0
    public void OnClick()
    {
        string PlayerName    = transform.GetChild(0).GetComponent <InputField>().text;
        string HostIPAddress = transform.GetChild(1).GetComponent <InputField>().text;

        netWorkManager.Connect(HostIPAddress);
        netWorkManager.Request(NetWorkManager.RequestParameter.PlayerName, PlayerName);
        this.transform.parent.gameObject.SetActive(false);
    }