Ejemplo n.º 1
0
 public void DestoryMyChild(SubMessage Child)//删除出现并被确认过的消息
 {
     if (MessageBoxArray.Contains(Child))
     {
         MessageBoxArray.Remove(Child);
     }
     MessageBox.Instance.ShowRemainMsgBox();
 }
Ejemplo n.º 2
0
        public void SetMsgAttribute(SubMessage messageClass)
        {
            IsClicked    = false;
            MySubMessage = messageClass;
            MySubMessage.setObjectFlag = SetObjectEnableFlag;
            MsgMainTxt.text            = MySubMessage.MsgMainBody;
            switch (messageClass.messageType)
            {
            case MessageType.UnlockTipsMessage:
            case MessageType.TipsMessage:
                StartCoroutine(CloseMyselfForSeconds(MySubMessage.ShowTime));
                break;

            default:
            {
                if (messageClass.messageType == MessageType.WithTwoParamMoney)
                {
                    Transform showIcon     = MsgLable.transform.parent.Find("Icon");
                    int       changeSprite = 0;
                    if (messageClass.ShowCoinType == EMessageCoinType.EGoldType)
                    {
                        changeSprite = 1;
                    }
                    else
                    {
                        changeSprite = 2;
                    }
                    if (showIcon != null)
                    {
                        showIcon.GetComponent <SpriteSwith>().ChangeSprite(changeSprite);
                    }
                    MsgLable.text = MySubMessage.MsgMoneyStr;
                }
                else
                {
                    MsgLable.text = MySubMessage.MsgTitle;
                }
                if (EnSurebuttonCallBack != null)
                {
                    EnSurebuttonCallBack.SetButtonText(messageClass.EnsureBtnStr);
                }
                if (CancelbuttonCallBack != null)
                {
                    CancelbuttonCallBack.SetButtonText(messageClass.CancelBtnStr);
                }
            }
            break;
            }
        }
Ejemplo n.º 3
0
 public void AddSubMessage(SubMessage subMessage)//增加消息到我这一层中
 {
     MessageBoxArray.Add(subMessage);
 }