private void setPanel5() { _panel5.transform.FindChild("Button").GetComponent <Button>().onClick.AddListener(delegate { ProtoReq.addCoin(int.Parse(_panel5.transform.FindChild("id").GetComponent <InputField>().text).IdEx(), int.Parse(_panel5.transform.FindChild("coin").GetComponent <InputField>().text)); }); }
public override void OnInspectorGUI() { debug = (DebugInspector)target; base.OnInspectorGUI(); GUILayout.BeginHorizontal(); GUILayout.Label("查询ID", GUILayout.Width(80)); debug.cxID = int.Parse(GUILayout.TextField(debug.cxID.ToString())); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("查询")) { //debug.info = "查询"; ProtoReq.findUser(debug.cxID); } GUILayout.EndHorizontal(); GUILayout.Space(20); GUILayout.BeginHorizontal(); GUILayout.Label("ID", GUILayout.Width(40)); debug.coinID = int.Parse(GUILayout.TextField(debug.coinID.ToString(), GUILayout.Width(100))); GUILayout.Label("金币数:", GUILayout.Width(40)); debug.coinAdd = int.Parse(GUILayout.TextField(debug.coinAdd.ToString(), GUILayout.Width(100))); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("添加")) { ProtoReq.addCoin(debug.coinID, debug.coinAdd); //debug.info = "添加"; } GUILayout.EndHorizontal(); GUILayout.Space(20); GUILayout.BeginHorizontal(); if (GUILayout.Button("查看当前玩家数")) { ProtoReq.findPlayer(); //debug.info = "查看当前玩家数"; } GUILayout.EndHorizontal(); GUILayout.Space(20); GUILayout.BeginHorizontal(); GUILayout.TextArea(debug.info, GUILayout.Height(100)); GUILayout.EndHorizontal(); }
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; }); }