Exemplo n.º 1
0
    protected void HideChallengeUI()
    {
        this.BossEnterID            = 0;
        this.BossEnterMonsterDataID = 0;
        TownUI townUI = UIManagerControl.Instance.GetUIIfExist("TownUI") as TownUI;

        if (townUI != null)
        {
            townUI.ShowWildBossBubble(false, null);
        }
    }
Exemplo n.º 2
0
    protected void ShowChallengeBubble(int id, int monsterDataID)
    {
        this.BossEnterID            = id;
        this.BossEnterMonsterDataID = monsterDataID;
        TownUI townUI = UIManagerControl.Instance.GetUIIfExist("TownUI") as TownUI;

        if (townUI != null)
        {
            townUI.ShowWildBossBubble(true, new Action(this.OnClickChallengeUI));
        }
    }
Exemplo n.º 3
0
    public void TryShowNewFashionRecommend()
    {
        if (this.newFashionDataIDs.get_Count() == 0)
        {
            return;
        }
        if (!UIManagerControl.Instance.IsOpen("TownUI"))
        {
            return;
        }
        TownUI townUI = UIManagerControl.Instance.GetUIIfExist("TownUI") as TownUI;

        if (!townUI)
        {
            return;
        }
        string text = this.newFashionDataIDs.get_Item(0);

        while (!DataReader <ShiZhuangXiTong> .Contains(text) && this.newFashionDataIDs.get_Count() > 1)
        {
            this.newFashionDataIDs.RemoveAt(0);
            text = this.newFashionDataIDs.get_Item(0);
        }
        if (!DataReader <ShiZhuangXiTong> .Contains(text))
        {
            return;
        }
        ShiZhuangXiTong newFashionData = DataReader <ShiZhuangXiTong> .Get(text);

        if (!DataReader <Items> .Contains(newFashionData.itemsID))
        {
            return;
        }
        Items items = DataReader <Items> .Get(newFashionData.itemsID);

        townUI.SetNewFashionRecommend(text, items.icon, GameDataUtils.GetChineseContent(1005026, false), GameDataUtils.GetChineseContent(items.name, false), GameDataUtils.GetChineseContent(1005025, false), delegate
        {
            LinkNavigationManager.OpenActorUI(delegate
            {
                this.OpenFashionUI((FashionDataSelete)newFashionData.kind);
            });
        }, delegate
        {
            this.newFashionDataIDs.RemoveAt(0);
            this.TryShowNewFashionRecommend();
        });
    }
Exemplo n.º 4
0
 public void OnFirstRechargePush(short state, FirstRechargePush down = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (down != null)
     {
         this.State = down.flag;
         this.IsPayButRewardNoObtain = this.CheckIsPayButRewardNoObtain();
         UIBase uIIfExist = UIManagerControl.Instance.GetUIIfExist("TownUI");
         if (uIIfExist != null)
         {
             TownUI townUI = uIIfExist as TownUI;
             townUI.ControlSystemOpens(false, 9);
         }
     }
 }
Exemplo n.º 5
0
 public void OnDayGiftPush(short state, MinorLoginNty down = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (down != null)
     {
         this.State           = down.minorLogin;
         this.IsCanGetDayGift = this.CheckIsCanGetDayGift();
         this.DataInfo        = down;
         UIBase uIIfExist = UIManagerControl.Instance.GetUIIfExist("TownUI");
         if (uIIfExist != null)
         {
             TownUI townUI = uIIfExist as TownUI;
             townUI.ControlSystemOpens(false, 70);
         }
     }
 }
Exemplo n.º 6
0
 private void OnGetSignChangedNty(short state, SignChangedNty down = null)
 {
     if (state == 0)
     {
         if (down != null)
         {
             this.monthSignInfo = down.monthSignInfo;
             EventDispatcher.Broadcast(EventNames.OnGetSignChangedNty);
             TownUI townUI = UIManagerControl.Instance.GetUIIfExist("TownUI") as TownUI;
             if (townUI != null)
             {
                 townUI.CheckBeniftRedPoint();
             }
         }
     }
     else
     {
         StateManager.Instance.StateShow(state, 0);
     }
 }
Exemplo n.º 7
0
    public void TryShowTimeoutRecommend()
    {
        if (this.timeoutFashionDataIDs.get_Count() == 0)
        {
            return;
        }
        if (!UIManagerControl.Instance.IsOpen("TownUI"))
        {
            return;
        }
        TownUI townUI = UIManagerControl.Instance.GetUIIfExist("TownUI") as TownUI;

        if (!townUI)
        {
            return;
        }
        string timeoutFashionDataID = this.timeoutFashionDataIDs.get_Item(0);

        this.timeoutFashionDataIDs.RemoveAt(0);
        while (!DataReader <ShiZhuangXiTong> .Contains(timeoutFashionDataID) && this.timeoutFashionDataIDs.get_Count() > 0)
        {
            timeoutFashionDataID = this.timeoutFashionDataIDs.get_Item(0);
            this.timeoutFashionDataIDs.RemoveAt(0);
        }
        if (!DataReader <ShiZhuangXiTong> .Contains(timeoutFashionDataID))
        {
            return;
        }
        ShiZhuangXiTong shiZhuangXiTong = DataReader <ShiZhuangXiTong> .Get(timeoutFashionDataID);

        if (!DataReader <Items> .Contains(shiZhuangXiTong.itemsID))
        {
            return;
        }
        Items items = DataReader <Items> .Get(shiZhuangXiTong.itemsID);

        townUI.SetFashionTimeoutRecommend(items.icon, GameDataUtils.GetChineseContent(1005022, false), GameDataUtils.GetChineseContent(1005023, false), GameDataUtils.GetChineseContent(1005024, false), delegate
        {
            FashionManager.Instance.OpenBuyFashionUI(timeoutFashionDataID);
        }, new Action(this.TryShowTimeoutRecommend));
    }
Exemplo n.º 8
0
    public static bool GetTargetPosition(int areaId, int widgetId, ref Vector3 position, ref Vector2 offset)
    {
        offset = Vector2.get_zero();
        TownUI instance = TownUI.Instance;

        if (instance == null)
        {
            Debug.LogError("TownUI is null");
            return(false);
        }
        Transform transform = null;

        switch (areaId)
        {
        case 1:
            transform = instance.FindTransform("HeadIcon");
            break;

        case 2:
        {
            transform = instance.FindTransform("ButtonsLeftBase");
            int indexOfLeftMiddle = SystemOpenManager.GetIndexOfLeftMiddle(areaId);
            offset = new Vector2(0f, (float)(-(float)indexOfLeftMiddle * 110));
            break;
        }

        case 3:
            transform = WidgetSystem.FindWidgetOnUI(widgetId, true);
            if (transform != null)
            {
                transform.get_gameObject().SetActive(true);
            }
            instance.SwitchTopRightButtonToShow();
            break;

        case 5:
            transform = WidgetSystem.FindWidgetOnUI(widgetId, true);
            if (transform != null)
            {
                transform.get_gameObject().SetActive(true);
            }
            instance.ForceOpenRightBottom();
            break;

        case 6:
            transform = instance.FindTransform("BigFight");
            break;

        case 7:
            instance.CloseRightMoreButton();
            transform = instance.FindTransform("DailyTask");
            break;

        case 8:
            transform = instance.FindTransform("GodWeaponButton");
            break;
        }
        if (transform == null)
        {
            Debug.LogError(string.Concat(new object[]
            {
                "指导目标为空!!!区域:",
                areaId,
                ", 组件:",
                widgetId
            }));
            return(false);
        }
        position = transform.get_position();
        Debug.Log(string.Concat(new object[]
        {
            "指导目标:",
            transform.get_gameObject().get_name(),
            ", 坐标:",
            position
        }));
        return(true);
    }