コード例 #1
0
    public void onReceive_ReadNotice(string data)
    {
        // 优先使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("Item_Notice_List_Script_hotfix", "onReceive_ReadNotice"))
        {
            ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.Item_Notice_List_Script_hotfix", "onReceive_ReadNotice", null, data);
            return;
        }

        JsonData jd        = JsonMapper.ToObject(data);
        int      code      = (int)jd["code"];
        int      notice_id = (int)jd["notice_id"];

        if (code == (int)TLJCommon.Consts.Code.Code_OK)
        {
            m_parentScript.setNoticeReaded(notice_id);
        }

        NoticeDetailScript.create(int.Parse(gameObject.transform.name), m_parentScript);

        if (OtherData.s_mainScript != null)
        {
            OtherData.s_mainScript.checkRedPoint();
        }
    }
コード例 #2
0
    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();
        }
    }