예제 #1
0
        void RemoveAlert(TDBaseAlertData alert)
        {
            BaseAlertItem tempAlert = ActiveItems.Find((x) => { return(x.DataIndex == alert.ID); });

            if (tempAlert == null)
            {
                return;
            }
            tempAlert.Show(false);
            ActiveItems.Remove(tempAlert);
        }
예제 #2
0
        void AddAlert(TDBaseAlertData alert)
        {
            GameObject    go        = GOPool.Spawn();
            BaseAlertItem alertItem = go.GetComponent <BaseAlertItem>();

            alertItem.Init(new BaseButtonData {
                IconStr = alert.Icon,
                BgStr   = alert.Bg,
                OnClick = alert.OnClick,
                OnShow  = OnAlertShow,
            });
            alertItem.Show(true);
            alertItem.RectTrans.position = StartPos.position;
            ActiveItems.Add(alertItem);
        }