Exemplo n.º 1
0
 private void setPanel()
 {
     _panel.transform.FindChild("Button").GetComponent <Button>().onClick.AddListener(delegate
     {
         ProtoReq.GMQuerySinglePlayer(int.Parse(_panel.transform.FindChild("id").GetComponent <InputField>().text).IdEx());
     });
 }
Exemplo n.º 2
0
    private void addClick()
    {
        _close.onClick.AddListener(delegate
        {
            ClosePanel();
        });

        _confirm.onClick.AddListener(delegate
        {
            if (_idInput.text.Equals(""))
            {
                QuickTips.ShowRedQuickTips("请输入玩家id");
                return;
            }
            ProtoReq.GMQuerySinglePlayer(int.Parse(_idInput.text).IdEx());
        });

        _set.onClick.AddListener(delegate
        {
            if (_idInput.text.Equals(""))
            {
                QuickTips.ShowRedQuickTips("请输入玩家id");
                return;
            }

            if (int.Parse(_coinInput.text) > DataMgr.Instance.money)
            {
                _warning.SetActive(true);
                return;
            }
            _warning.SetActive(false);
            ProtoReq.addCoin(int.Parse(_idInput.text).IdEx(), int.Parse(_coinInput.text));
            _idInput.text = "";
        });

        _up.onClick.AddListener(delegate
        {
            if (index >= 6)
            {
                ProtoReq.GMQueryMoneyLog(MainRole.Instance.Id, true, index - 6);
            }
            page = -1;
        });

        _down.onClick.AddListener(delegate
        {
            ProtoReq.GMQueryMoneyLog(MainRole.Instance.Id, true, index + 6);
            page = 1;
        });
    }