Пример #1
0
        void OnGUI()
        {
            if (GUILayout.Button("添加消息Eat"))
            {
                GameUI_Mgr_Remind.SetRemindState(RemindType.RemindType_1, RemindCtrlType.RemindCtrlType_1, true);
            }

            if (GUILayout.Button("添加消息Eight"))
            {
                GameUI_Mgr_Remind.SetRemindState(RemindType.RemindType_1, RemindCtrlType.RemindCtrlType_2, true);
            }

            if (GUILayout.Button("删除消息Eat"))
            {
                GameUI_Mgr_Remind.SetRemindState(RemindType.RemindType_1, RemindCtrlType.RemindCtrlType_1, false);
            }

            if (GUILayout.Button("删除消息Eight"))
            {
                GameUI_Mgr_Remind.SetRemindState(RemindType.RemindType_1, RemindCtrlType.RemindCtrlType_2, false);
            }

            if (GUILayout.Button("添加消息Team"))
            {
                GameUI_Mgr_Remind.SetRemindState(RemindType.RemindType_2, RemindCtrlType.RemindCtrlType_3, true);
            }

            if (GUILayout.Button("删除消息Team"))
            {
                GameUI_Mgr_Remind.SetRemindState(RemindType.RemindType_2, RemindCtrlType.RemindCtrlType_3, false);
            }
        }
Пример #2
0
        void Awake()
        {
            ins = this;

            messageMgr = new MessagerMgr();

            Init();
        }
Пример #3
0
        void Start()
        {
            if (!first)
            {
                return;
            }
            first = false;

            GameUI_Mgr_Remind.messageMgr.addMessageLister(this, msgType.ToString(), CheckStateCallBack);

            if (!GameUI_Mgr_Remind.remindFunc.ContainsKey(this))
            {
                if (GameUI_Mgr_Remind.GetRemindState(type, ctrlType))
                {
                    GameUI_Mgr_Remind.remindFunc.Add(this, true);
                }
                else
                {
                    GameUI_Mgr_Remind.remindFunc.Add(this, false);
                }
            }
        }
Пример #4
0
        void CheckStateCallBack(object sender, MsgArgs e)
        {
            RemindType     _type     = (RemindType)(int.Parse(e.paramList[0].ToString()));
            RemindCtrlType _ctrlType = (RemindCtrlType)(int.Parse(e.paramList[1].ToString()));

            if (ctrlType == RemindCtrlType.None)
            {
                if (_type == type)
                {
                    if (!GameUI_Mgr_Remind.remindFunc.ContainsKey(this))
                    {
                        if (GameUI_Mgr_Remind.GetRemindState(type, ctrlType))
                        {
                            GameUI_Mgr_Remind.remindFunc.Add(this, true);
                        }
                        else
                        {
                            GameUI_Mgr_Remind.remindFunc.Add(this, false);
                        }
                    }
                    return;
                }
            }
            if (_ctrlType == ctrlType)
            {
                if (!GameUI_Mgr_Remind.remindFunc.ContainsKey(this))
                {
                    if (GameUI_Mgr_Remind.GetRemindState(type, ctrlType))
                    {
                        GameUI_Mgr_Remind.remindFunc.Add(this, true);
                    }
                    else
                    {
                        GameUI_Mgr_Remind.remindFunc.Add(this, false);
                    }
                }
            }
        }