// 모든 elememnt 들 생성하기 public void Creat_Element() { //소식 생성-> 공지는 공지데이터 따로 있음 / 알림및선물 은 선물아이템있으면 선물 ,없으면 알림임 / 초대는 클랜 초대 데이터로 이용 //알림및선물 구분 foreach (var item in Dic_userPosts) { UIItem_newsElement _newsEle = ui_mgr.CreatUI(UIITEM.ITEM_NEWSELEMENT, RectTr_content) as UIItem_newsElement; _newsEle.Set_ElementInfo(item.Value); lst_newsElemnet.Add(_newsEle); } //공지 구분 foreach (var noti in Dic_infosNotice) { if (noti.Value.LggCd == (byte)OptionSetting.instance.usingLangueage) //공지사항의 국가코드가 현재 국가코드랑 같으면 { if (noti.Value.Noticetime > TimeManager.Instance.Get_nowTime()) { UIItem_newsElement _newsEle = ui_mgr.CreatUI(UIITEM.ITEM_NEWSELEMENT, RectTr_content) as UIItem_newsElement; _newsEle.Set_ElementInfo(noti.Value); lst_newsElemnet.Add(_newsEle); } } } }
// element 하나만삭제 public void ClearElement_One(UIItem_newsElement _newElement) { //우편물 확인하엿고 수령하였으로. 확인한 우편물 갯수저장 if (PlayerPrefs.HasKey(DefineKey.PostCount)) { PlayerPrefs.SetInt(DefineKey.PostCount, PlayerPrefs.GetInt(DefineKey.PostCount) - 1); } PlayerPrefs.Save(); Destroy(_newElement.gameObject); lst_newsElemnet.Remove(_newElement); }