// 限时话费赛
    public static void setPanel_xianshihuafeisai(string url)
    {
        // 使用热更新的代码
        if (ILRuntimeUtil.getInstance().checkDllClassHasFunc("ActivityManager_hotfix", "setPanel_xianshihuafeisai"))
        {
            s_panel = (GameObject)ILRuntimeUtil.getInstance().getAppDomain().Invoke("HotFix_Project.ActivityManager_hotfix", "setPanel_xianshihuafeisai", null, url);
            return;
        }

        GameObject prefabs = Resources.Load("Prefabs/Activity/Activity_image_button") as GameObject;

        s_panel = GameObject.Instantiate(prefabs);
        s_panel.GetComponent <Activity_image_button_Script>().m_image.gameObject.AddComponent <DownImageUtil>();
        s_panel.GetComponent <Activity_image_button_Script>().m_image.gameObject.GetComponent <DownImageUtil>().startDown(url);

        Activity_image_button_Script script = s_panel.GetComponent <Activity_image_button_Script>();

        script.m_btn2.transform.localPosition = new Vector3(-21.69f, -128.2f, 0);
        script.m_btn1.transform.Find("Text").GetComponent <Text>().text = "前往";
        script.m_btn1.onClick.AddListener(() =>
        {
            GameObject.Destroy(OtherData.s_activity.gameObject);
            PVPChoiceScript.create(true);
        });

        script.m_btn2.transform.localScale = new Vector3(0, 0, 0);
        script.m_btn3.transform.localScale = new Vector3(0, 0, 0);
    }
Exemplo n.º 2
0
        public static void Start()
        {
            PVPChoiceScript script = OtherData.s_pvpChoiceScript;

            script.m_ListViewScript = script.m_listView.GetComponent <ListViewScript>();

            if (PVPChoiceScript.s_isShowBiSaiChang)
            {
                script.showHuaFeiChang();
                script.showMyBaoMingFei(false);
            }
            else
            {
                script.showJinBiChang();
                script.showMyBaoMingFei(true);
            }

            // 更新的部分
            {
                if (OtherData_hotfix.getIsIosCheck())
                {
                    script.transform.Find("Image_bg/Image_tab_bg/Button_tiaozhansai").localPosition = Vector3.zero;
                    script.transform.Find("Image_bg/Image_tab_bg/Image").localPosition = Vector3.zero;
                    script.transform.Find("Image_bg/Image_tab_bg").GetComponent <RectTransform>().sizeDelta = Vector2.zero;

                    script.transform.Find("Image_bg/Image_tab_bg/Button_huafeisai").localScale = Vector3.zero;
                }
            }
        }