示例#1
0
 public void Clear()
 {
     this.unRegEvent();
     if (this.m_dragonIcon != null)
     {
         this.m_dragonIcon.Clear();
         this.m_dragonIcon = null;
     }
     if (this.m_miniMapCameraFrame != null)
     {
         this.m_miniMapCameraFrame.Clear();
         this.m_miniMapCameraFrame = null;
     }
     this.mmRoot     = null;
     this.bmRoot     = null;
     this.mmpcAlies  = null;
     this.mmpcHero   = null;
     this.mmpcEnemy  = null;
     this.mmpcOrgan  = null;
     this.mmpcSignal = null;
     this.mmpcDragon = null;
     this.mmpcEffect = null;
     this.mmpcEye    = null;
     this.bmpcAlies  = null;
     this.bmpcHero   = null;
     this.bmpcEnemy  = null;
     this.bmpcOrgan  = null;
     this.bmpcSignal = null;
     this.bmpcDragon = null;
     this.mmpcEffect = null;
     this.bmpcEye    = null;
     this._ownerForm = null;
 }
示例#2
0
        public void Init(CUIFormScript formObj, SLevelContext levelContext)
        {
            if (formObj != null)
            {
                this._ownerForm = formObj;
                this.mmRoot     = Utility.FindChild(formObj.gameObject, "MapPanel/Mini");
                this.bmRoot     = Utility.FindChild(formObj.gameObject, "MapPanel/Big");
                if ((this.mmRoot != null) && (this.bmRoot != null))
                {
                    if (!levelContext.IsMobaMode())
                    {
                        this.mmRoot.SetActive(false);
                        this.bmRoot.SetActive(false);
                    }
                    else if (levelContext != null)
                    {
                        this.regEvent();
                        this.mmpcAlies  = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Alies");
                        this.mmpcHero   = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Hero");
                        this.mmpcEnemy  = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Enemy");
                        this.mmpcOrgan  = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Organ");
                        this.mmpcSignal = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Signal");
                        this.mmpcDragon = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Dragon");
                        this.mmpcEffect = Utility.FindChild(this.mmRoot, "BigMapEffectRoot");
                        this.mmpcEye    = Utility.FindChild(this.mmRoot, "Container_MiniMapPointer_Eye");
                        this.bmpcAlies  = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Alies");
                        this.bmpcHero   = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Hero");
                        this.bmpcEnemy  = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Enemy");
                        this.bmpcOrgan  = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Organ");
                        this.bmpcSignal = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Signal");
                        this.bmpcDragon = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Dragon");
                        this.mmpcEffect = Utility.FindChild(this.bmRoot, "BigMapEffectRoot");
                        this.bmpcEye    = Utility.FindChild(this.bmRoot, "Container_BigMapPointer_Eye");
                        this.mmRoot.CustomSetActive(true);
                        this.bmRoot.CustomSetActive(true);
                        RectTransform transform = null;
                        if (levelContext.IsMobaMode())
                        {
                            float num;
                            this.Switch(EMapType.Mini);
                            transform = this.initMap(this.bmRoot, levelContext, false, out num);
                            transform.anchoredPosition = new Vector2(transform.rect.width * 0.5f, -transform.rect.height * 0.5f);
                            transform = this.initMap(this.mmRoot, levelContext, true, out num);
                            if (levelContext.m_pvpPlayerNum == 6)
                            {
                                transform.anchoredPosition = new Vector2(transform.anchoredPosition.x + ((transform.rect.width * 0.5f) - (num * 0.5f)), transform.anchoredPosition.y);
                                GameObject obj2 = Utility.FindChild(this._ownerForm.gameObject, "MapPanel/DragonInfo");
                                GameObject obj3 = Utility.FindChild(this._ownerForm.gameObject, "MapPanel/Button_Signal_1");
                                if (obj2 != null)
                                {
                                    RectTransform transform2 = obj2.gameObject.transform as RectTransform;
                                    transform2.anchoredPosition = new Vector2(transform.anchoredPosition.x, transform2.anchoredPosition.y);
                                }
                                if (obj3 != null)
                                {
                                    RectTransform transform3 = obj3.gameObject.transform as RectTransform;
                                    transform3.anchoredPosition = new Vector2((transform.rect.width - (transform3.rect.width * 0.5f)) + 43f, transform3.anchoredPosition.y);
                                }
                            }
                        }
                        else
                        {
                            this.Switch(EMapType.None);
                        }
                        this.curMapType = EMapType.Mini;
                        bool flag  = false;
                        bool flag2 = false;
                        if (levelContext.m_pveLevelType == RES_LEVEL_TYPE.RES_LEVEL_TYPE_GUIDE)
                        {
                            switch (levelContext.m_mapID)
                            {
                            case 2:
                                flag  = true;
                                flag2 = false;
                                break;

                            case 3:
                            case 6:
                            case 7:
                                flag  = true;
                                flag2 = true;
                                break;
                            }
                        }
                        else if ((levelContext.m_pvpPlayerNum == 6) || (levelContext.m_pvpPlayerNum == 10))
                        {
                            flag  = true;
                            flag2 = levelContext.m_pvpPlayerNum == 10;
                        }
                        if (flag && (this.mmpcDragon != null))
                        {
                            this.m_dragonIcon = new DragonIcon();
                            this.m_dragonIcon.Init(this.mmpcDragon, this.bmpcDragon, flag2);
                        }
                        GameObject gameObject = this.mmRoot.transform.Find("CameraFrame").gameObject;
                        if (gameObject != null)
                        {
                            this.m_miniMapCameraFrame = new MiniMapCameraFrame(gameObject, transform.sizeDelta.x, transform.sizeDelta.y);
                            this.m_miniMapCameraFrame.SetFrameSize((CameraHeightType)GameSettings.CameraHeight);
                        }
                    }
                }
            }
        }