示例#1
0
        // Token: 0x0600D596 RID: 54678 RVA: 0x003A4570 File Offset: 0x003A2770
        public void ShowRewardGoodsDesc(PrefabControllerBase ctrl, GoodsType goodsType, int goodsId, int alignType = 0, GameObject gameObjectForPosCalc = null, bool isNeedAutoClose = true)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_ShowRewardGoodsDescPrefabControllerBaseGoodsTypeInt32Int32GameObjectBoolean_hotfix != null)
            {
                this.m_ShowRewardGoodsDescPrefabControllerBaseGoodsTypeInt32Int32GameObjectBoolean_hotfix.call(new object[]
                {
                    this,
                    ctrl,
                    goodsType,
                    goodsId,
                    alignType,
                    gameObjectForPosCalc,
                    isNeedAutoClose
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            PrefabControllerCreater.CreateAllControllers(base.gameObject);
            RewardGoodsDescUIController component = base.gameObject.GetComponent <RewardGoodsDescUIController>();

            component.InitRewardGoodsDescInfo(goodsType, goodsId, isNeedAutoClose);
            if (gameObjectForPosCalc == null)
            {
                gameObjectForPosCalc = ctrl.gameObject;
            }
            component.gameObject.SetActive(true);
            component.StartCoroutine(RewardGoodsDescUIController.Co_ShowRewardGoodsDesc(component, gameObjectForPosCalc, alignType));
        }
示例#2
0
        // Token: 0x0600D597 RID: 54679 RVA: 0x003A4690 File Offset: 0x003A2890
        private static IEnumerator Co_ShowRewardGoodsDesc(RewardGoodsDescUIController descCtrl, GameObject gameObjectForPosCalc, int alignType)
        {
            descCtrl.gameObject.transform.position = new Vector3(0f, 100f, 0f);
            yield return(null);

            descCtrl.ShowPanel();
            Vector3 p = gameObjectForPosCalc.transform.position;

            descCtrl.gameObject.transform.position = p;
            RectTransform rt = descCtrl.gameObject.transform as RectTransform;

            if (rt != null)
            {
                if (alignType == 0)
                {
                    float num = gameObjectForPosCalc.GetComponent <RectTransform>().rect.height * 0.5f;
                    float x   = 0f;
                    if (rt.anchoredPosition.x < 0f && rt.anchoredPosition.x - descCtrl.GetBackgroundTransform().rect.width * 0.5f < -960f)
                    {
                        x = -960f - (rt.anchoredPosition.x - descCtrl.GetBackgroundTransform().rect.width * 0.5f);
                    }
                    else if (rt.anchoredPosition.x > 0f && rt.anchoredPosition.x + descCtrl.GetBackgroundTransform().rect.width * 0.5f > 960f)
                    {
                        x = 960f - (rt.anchoredPosition.x + descCtrl.GetBackgroundTransform().rect.width * 0.5f);
                    }
                    float y;
                    if (p.y > 0f)
                    {
                        y = -num - 170f;
                    }
                    else
                    {
                        y = num + descCtrl.GetBackgroundTransform().rect.height - 160f;
                    }
                    rt.anchoredPosition = rt.anchoredPosition + new Vector2(x, 0f) + new Vector2(0f, y);
                }
                else
                {
                    float num2 = 280f + gameObjectForPosCalc.GetComponent <RectTransform>().rect.width * 0.5f;
                    if (p.x > 0.5f)
                    {
                        num2 = -num2;
                    }
                    float y2 = 0f;
                    if (rt.anchoredPosition.y < 0f && rt.anchoredPosition.y - descCtrl.GetBackgroundTransform().rect.height * 0.5f < -500f)
                    {
                        y2 = -500f - (rt.anchoredPosition.y - descCtrl.GetBackgroundTransform().rect.height * 0.5f);
                    }
                    else if (rt.anchoredPosition.y > 0f && rt.anchoredPosition.y + descCtrl.GetBackgroundTransform().rect.height * 0.5f > 500f)
                    {
                        y2 = 500f - (rt.anchoredPosition.y + descCtrl.GetBackgroundTransform().rect.height * 0.5f);
                    }
                    rt.anchoredPosition = rt.anchoredPosition + new Vector2(num2, 0f) + new Vector2(0f, y2);
                }
            }
            yield break;
        }
示例#3
0
 // Token: 0x0600D5B2 RID: 54706 RVA: 0x003A4C18 File Offset: 0x003A2E18
 public LuaExportHelper(RewardGoodsDescUIController owner)
 {
     this.m_owner = owner;
 }
示例#4
0
 // Token: 0x0600D5E8 RID: 54760 RVA: 0x003A4F80 File Offset: 0x003A3180
 public static IEnumerator Co_ShowRewardGoodsDesc(RewardGoodsDescUIController descCtrl, GameObject gameObjectForPosCalc, int alignType)
 {
     return(RewardGoodsDescUIController.Co_ShowRewardGoodsDesc(descCtrl, gameObjectForPosCalc, alignType));
 }