|
@@ -11,7 +11,7 @@ namespace GFGGame
|
|
|
|
|
|
public override void Dispose()
|
|
|
{
|
|
|
- if(_ui != null)
|
|
|
+ if (_ui != null)
|
|
|
{
|
|
|
_ui.Dispose();
|
|
|
}
|
|
@@ -27,8 +27,11 @@ namespace GFGGame
|
|
|
this.viewCom.Center();
|
|
|
this.modal = true;
|
|
|
|
|
|
- _ui.m_btnGetAllDressUpItem.onClick.Add(OnClickBtnGetAllDressUpItem);
|
|
|
- _ui.m_btnGetAllCardItem.onClick.Add(OnClickBtnGetAllCardItem);
|
|
|
+ _ui.m_ComBtn.m_btnGetAllDressUpItem.onClick.Add(OnClickBtnGetAllDressUpItem);
|
|
|
+ _ui.m_ComBtn.m_btnGetAllCardItem.onClick.Add(OnClickBtnGetAllCardItem);
|
|
|
+ _ui.m_ComBtn.m_btnSetLv.onClick.Add(OnClickBtnSetLv);
|
|
|
+ _ui.m_ComBtn.m_btnSetChapter.onClick.Add(OnClickBtnSetChapter);
|
|
|
+ _ui.m_ComBtn.m_btnAll.onClick.Add(OnClickBtnAll);
|
|
|
_ui.m_btnAddItem.onClick.Add(OnClickBtnAddItem);
|
|
|
_ui.m_btnGM.onClick.Add(OnClickBtnGM);
|
|
|
}
|
|
@@ -57,15 +60,15 @@ namespace GFGGame
|
|
|
{
|
|
|
string content = _ui.m_inputItem.text;
|
|
|
string[] infos = Regex.Split(content, " ");
|
|
|
- if(infos.Length < 2)
|
|
|
+ if (infos.Length < 2)
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
int itemId = int.Parse(infos[0]);
|
|
|
int itemNum = int.Parse(infos[1]);
|
|
|
- if(itemId > 0 && itemNum > 0)
|
|
|
+ if (itemId > 0 && itemNum > 0)
|
|
|
{
|
|
|
string messageSuc = "已获得物品" + itemId + "*" + itemNum;
|
|
|
GMController.SendGMCommand("getItem " + content, messageSuc).Coroutine();
|
|
@@ -75,6 +78,43 @@ namespace GFGGame
|
|
|
PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
|
|
|
}
|
|
|
}
|
|
|
+ private void OnClickBtnSetLv()
|
|
|
+ {
|
|
|
+ int tmp;
|
|
|
+ if (!int.TryParse(_ui.m_ComBtn.m_txtRoleLv.text, out tmp))
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("请输入数字");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ string lv = _ui.m_ComBtn.m_txtRoleLv.text;
|
|
|
+ string messageSuc = "等级提升至" + lv;
|
|
|
+
|
|
|
+ GMController.SendGMCommand("lv " + lv, messageSuc).Coroutine();
|
|
|
+ }
|
|
|
+ private void OnClickBtnSetChapter()
|
|
|
+ {
|
|
|
+ int tmp;
|
|
|
+ int tmp1;
|
|
|
+ if (!int.TryParse(_ui.m_ComBtn.m_txtChapter.text, out tmp) || !int.TryParse(_ui.m_ComBtn.m_txtChapterLv.text, out tmp1))
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("请输入数字");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ string content = _ui.m_ComBtn.m_txtChapter.text + " " + _ui.m_ComBtn.m_txtChapterLv.text;
|
|
|
+ string messageSuc = string.Format("当前关卡第{0}章第{1}关", _ui.m_ComBtn.m_txtChapter.text, _ui.m_ComBtn.m_txtChapterLv.text);
|
|
|
+ GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void OnClickBtnAll()
|
|
|
+ {
|
|
|
+ OnClickBtnGetAllDressUpItem();
|
|
|
+ OnClickBtnGetAllCardItem();
|
|
|
+ _ui.m_ComBtn.m_txtRoleLv.text = "99";
|
|
|
+ OnClickBtnSetLv();
|
|
|
+ _ui.m_ComBtn.m_txtChapter.text = "2";
|
|
|
+ _ui.m_ComBtn.m_txtChapterLv.text = "10";
|
|
|
+ OnClickBtnSetChapter();
|
|
|
+ }
|
|
|
|
|
|
private void OnClickBtnGM(EventContext context)
|
|
|
{
|
|
@@ -85,7 +125,8 @@ namespace GFGGame
|
|
|
PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
|
|
|
return;
|
|
|
}
|
|
|
- switch (infos[0]) {
|
|
|
+ switch (infos[0])
|
|
|
+ {
|
|
|
case "log":
|
|
|
if (infos[1] == "1")//开启日志按钮
|
|
|
{
|
|
@@ -98,7 +139,7 @@ namespace GFGGame
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- PromptController.Instance.ShowFloatTextPrompt(string.Format("log指令没有{0}这个状态",infos[1]));
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt(string.Format("log指令没有{0}这个状态", infos[1]));
|
|
|
}
|
|
|
break;
|
|
|
case "cjstime":
|
|
@@ -107,7 +148,7 @@ namespace GFGGame
|
|
|
PromptController.Instance.ShowFloatTextPrompt("请输入以秒为单位的正确的时间戳");
|
|
|
return;
|
|
|
}
|
|
|
- LuckyBoxDataManager.Instance.startTime = int .Parse(infos[1]);
|
|
|
+ LuckyBoxDataManager.Instance.startTime = int.Parse(infos[1]);
|
|
|
PromptController.Instance.ShowFloatTextPrompt("设置成功");
|
|
|
|
|
|
break;
|