Esempio n. 1
0
        void Remove(BaseLogData data)
        {
            BaseLogItem tempLogItem = ActiveItems.Find((x) => { return(x.ID == data.ID); });

            if (tempLogItem == null)
            {
                return;
            }
            tempLogItem.Show(false);
            ActiveItems.Remove(tempLogItem);
            DatasSet.Remove(data);
        }
Esempio n. 2
0
        void Add(BaseLogData data)
        {
            if (DatasSet.Contains(data))
            {
                return;
            }
            GameObject  go      = GOPool.Spawn();
            BaseLogItem logItem = go.GetComponent <BaseLogItem>();

            logItem.CancleInit();
            logItem.Init(new UButtonData
            {
                OnShowActive = OnAlertShow,
            });
            logItem.SetID(data.ID);
            logItem.Show(true, true);
            logItem.NameText           = data.GetDesc();
            logItem.RectTrans.position = StartPos.position;
            ActiveItems.Add(logItem);
            DatasSet.Add(data);
        }