public static void GetNoticeData(string result) { NoticelDataScript.getInstance().initJson(result); Activity.noticeDatas.Clear(); foreach (var noticeData in NoticelDataScript.getInstance().getNoticeDataList()) { if (noticeData.type == 1) { Activity.noticeDatas.Add(noticeData); } } // 更新的部分 { if (ShieldWeChat.isShield(OtherData.s_channelName)) { for (int i = (Activity.noticeDatas.Count - 1); i >= 0; i--) { if (Activity.noticeDatas[i].title.CompareTo("实名认证") == 0) { Activity.noticeDatas.RemoveAt(i); } } } } }
public static NoticelDataScript getInstance() { if (s_noticeData == null) { s_noticeData = new NoticelDataScript(); } return(s_noticeData); }
public void checkRedPoint() { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("NoticePanelScript_hotfix", "checkRedPoint")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.NoticePanelScript_hotfix", "checkRedPoint", null, null); return; } bool isShowRedPoint_huodong = false; bool isShowRedPoint_gonggao = false; for (int i = 0; i < NoticelDataScript.getInstance().getNoticeDataList().Count; i++) { // 活动 if (NoticelDataScript.getInstance().getNoticeDataList()[i].type == 0) { if (NoticelDataScript.getInstance().getNoticeDataList()[i].state == 0) { isShowRedPoint_huodong = true; } } // 公告 else if (NoticelDataScript.getInstance().getNoticeDataList()[i].type == 1) { if (NoticelDataScript.getInstance().getNoticeDataList()[i].state == 0) { isShowRedPoint_gonggao = true; } } } if (isShowRedPoint_huodong) { GameUtil.showGameObject(m_image_huodong_redPoint.gameObject); } else { GameUtil.hideGameObject(m_image_huodong_redPoint.gameObject); } if (isShowRedPoint_gonggao) { GameUtil.showGameObject(m_image_gonggao_redPoint.gameObject); } else { GameUtil.hideGameObject(m_image_gonggao_redPoint.gameObject); } }
public void GetNoticeData(string result) { NoticelDataScript.getInstance().initJson(result); foreach (var noticeData in NoticelDataScript.getInstance().getNoticeDataList()) { if (noticeData.type == 1) { noticeDatas.Add(noticeData); } } uiWarpContent.Init(noticeDatas.Count); }
public void onReceive_GetNotice(string data) { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("NoticePanelScript_hotfix", "onReceive_GetNotice")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.NoticePanelScript_hotfix", "onReceive_GetNotice", null, data); return; } NoticelDataScript.getInstance().initJson(data); checkRedPoint(); loadHuoDong(); }
public void onClickItem() { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("Item_Notice_List_Script_hotfix", "onClickItem")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.Item_Notice_List_Script_hotfix", "onClickItem", null, null); return; } if (NoticelDataScript.getInstance().getNoticeDataById(int.Parse(gameObject.transform.name)).state == 1) { NoticeDetailScript.create(int.Parse(gameObject.transform.name), m_parentScript); } else { LogicEnginerScript.Instance.GetComponent <ReadNoticeRequest>().setNoticeId(int.Parse(gameObject.transform.name)); LogicEnginerScript.Instance.GetComponent <ReadNoticeRequest>().CallBack = onReceive_ReadNotice; LogicEnginerScript.Instance.GetComponent <ReadNoticeRequest>().OnRequest(); } }
public void setNoticeId(int notice_id) { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("NoticeDetailScript_hotfix", "setNoticeId")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.NoticeDetailScript_hotfix", "setNoticeId", null, notice_id); return; } m_noticeData = NoticelDataScript.getInstance().getNoticeDataById(notice_id); m_title.text = m_noticeData.title_limian; string content = m_noticeData.content.Replace("^", "\r\n"); LogUtil.Log(content); m_content.text = content; //m_time.text = m_noticeData.start_time; m_from.text = m_noticeData.from; }
public void GetNoticeData(string result) { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("Activity_hotfix", "GetNoticeData")) { ILRuntimeUtil.getInstance().getAppDomain() .Invoke("HotFix_Project.Activity_hotfix", "GetNoticeData", null, result); return; } NoticelDataScript.getInstance().initJson(result); noticeDatas.Clear(); foreach (var noticeData in NoticelDataScript.getInstance().getNoticeDataList()) { if (noticeData.type == 1) { noticeDatas.Add(noticeData); } } }
// 显示公告 public void loadGongGao() { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("NoticePanelScript_hotfix", "loadGongGao")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.NoticePanelScript_hotfix", "loadGongGao", null, null); return; } m_curShowHuoDong = false; m_ListViewScript.clear(); for (int i = 0; i < NoticelDataScript.getInstance().getNoticeDataList().Count; i++) { if (NoticelDataScript.getInstance().getNoticeDataList()[i].type == 1) { GameObject prefab = Resources.Load("Prefabs/UI/Item/Item_Notice_List") as GameObject; GameObject obj = MonoBehaviour.Instantiate(prefab); obj.GetComponent <Item_Notice_List_Script>().m_parentScript = this; obj.GetComponent <Item_Notice_List_Script>().setNoticeData(NoticelDataScript.getInstance().getNoticeDataList()[i]); obj.transform.name = NoticelDataScript.getInstance().getNoticeDataList()[i].notice_id.ToString(); m_ListViewScript.addItem(obj); } } m_ListViewScript.addItemEnd(); if (m_ListViewScript.getItemCount() > 0) { m_text_zanwu.transform.localScale = new Vector3(0, 0, 0); } else { m_text_zanwu.transform.localScale = new Vector3(1, 1, 1); m_text_zanwu.text = "暂无公告"; } }
public void setNoticeReaded(int notice_id) { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("NoticePanelScript_hotfix", "setNoticeReaded")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.NoticePanelScript_hotfix", "setNoticeReaded", null, notice_id); return; } NoticelDataScript.getInstance().setNoticeReaded(notice_id); for (int i = 0; i < m_ListViewScript.getItemList().Count; i++) { if (m_ListViewScript.getItemList()[i].GetComponent <Item_Notice_List_Script>().getNoticeData().notice_id == notice_id) { m_ListViewScript.getItemList()[i].GetComponent <Item_Notice_List_Script>().m_redPoint.transform.localScale = new Vector3(0, 0, 0); break; } } checkRedPoint(); }
public override void OnResponse(string data) { // 优先使用热更新的代码 if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("GetNoticeRequest_hotfix", "OnResponse")) { ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.GetNoticeRequest_hotfix", "OnResponse", null, data); return; } JsonData jsonData = JsonMapper.ToObject(data); var code = (int)jsonData["code"]; if (code == (int)Consts.Code.Code_OK) { NoticelDataScript.getInstance().initJson(data); result = data; flag = true; } else { LogUtil.Log("返回公告活动数据错误:" + code); } }