Пример #1
0
        public static void InitAllGMCommand()
        {
            if (GMCommandWrapList.Count > 0)
            {
                return;
            }

            List <ConfGMCMD> gmCmdList = ConfGMCMD.array;

            for (int i = 0; i < gmCmdList.Count; ++i)
            {
                string strCmdType     = gmCmdList[i].messageName;
                Type   messageRawType = Type.GetType(strCmdType, true, true);
                if (messageRawType == null)
                {
                    Debug.LogError($"no message define:{strCmdType}");
                }

                ConfGMCMD confCMD = gmCmdList[i];

                GMCommandWrap cmdWrap = new GMCommandWrap()
                {
                    CommandName = confCMD.messageName,
                    conf        = confCMD,
                    MessageType = messageRawType
                };

                GMCommandWrapList.Add(cmdWrap);
            }
        }
Пример #2
0
                public void SetCommand(GMCommandWrap commandWrap)
                {
                    this.commandWrap = commandWrap;

                    this.m_commandName.Text = commandWrap.conf.messageDesc;
                    this.AddClickCallBack(OnSelectGMCommamd);
                }
Пример #3
0
                public void SetCommand(GMCommandWrap commandWrap)
                {
                    this.m_detailCommandWrap = commandWrap;

                    this.m_lbCommandDesc.Text = commandWrap.conf.messageDesc;
                    string[] paramsList = commandWrap.conf.messageFormat.Split(';');

                    this.m_gmCommandParamContainer.EnsureSize <GMCommandParamItem>(paramsList.Length);
                    for (int i = 0; i < paramsList.Length; ++i)
                    {
                        GMCommandParamItem item = this.m_gmCommandParamContainer.GetChild <GMCommandParamItem>(i);
                        item.SetParamName(paramsList[i]);
                        item.Visible = true;
                    }
                }
Пример #4
0
 public void ShowCommandDetail(GMCommandWrap selectedCommand)
 {
     this.m_detailPanel.SetCommand(selectedCommand);
 }