Beispiel #1
0
 private void RecvGemSysEmbedRes(short state, GemSysEmbedRes msg = null)
 {
     if (state != 0)
     {
         StateManager.Instance.StateShow(state, 0);
         return;
     }
     if (msg != null)
     {
         EquipLibType.ELT type     = msg.type;
         int          hole         = msg.hole;
         long         newGemId     = msg.newGemId;
         int          newGemTypeId = msg.newGemTypeId;
         GemEmbedInfo gemEmbedInfo = this.equipSlots[type - EquipLibType.ELT.Weapon, hole - 1];
         gemEmbedInfo.id     = newGemId;
         gemEmbedInfo.typeId = newGemTypeId;
         GemUI gemUI = UIManagerControl.Instance.GetUIIfExist("GemUI") as GemUI;
         if (gemUI != null)
         {
             gemUI.RefreshEquipSlot(msg.hole - 1, newGemTypeId);
         }
         GemSelectUI gemSelectUI = UIManagerControl.Instance.GetUIIfExist("GemSelectUI") as GemSelectUI;
         if (gemSelectUI != null)
         {
             gemSelectUI.Show(false);
         }
         EventDispatcher.Broadcast <int>(EventNames.UpdateEquipPosGemData, (int)msg.type);
         EventDispatcher.Broadcast(EventNames.EquipDetailedShouldCheckBadge);
         this.CheckCanShowWearingGemPromoteWay();
     }
 }
Beispiel #2
0
    private void OnClickBtnSlot(GameObject sender)
    {
        string text = sender.get_name().Substring(4);

        this.slotCurr = int.Parse(text);
        if (!this.IsSlotUnlocked(this.slotCurr))
        {
            this.SlotLock();
            return;
        }
        this.typeIdCurr = this.GetCurrTypeId(this.slotCurr);
        this.typeIdNext = GemGlobal.GetNextGemItemId(this.typeIdCurr);
        if (this.typeIdCurr == 0)
        {
            GemSelectUI gemSelectUI = UIManagerControl.Instance.OpenUI("GemSelectUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as GemSelectUI;
            gemSelectUI.Init((int)this.equipCurr, this.slotCurr);
        }
        else
        {
            GemSingleUI gemSingleUI = UIManagerControl.Instance.OpenUI("GemSingleUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush) as GemSingleUI;
        }
    }
Beispiel #3
0
    private void RecvGemSysCompositeRes(short state, GemSysCompositeRes msg = null)
    {
        if (state != 0)
        {
            StateManager.Instance.StateShow(state, 0);
            return;
        }
        if (msg == null)
        {
            return;
        }
        GemSelectUI gemSelectUI = UIManagerControl.Instance.GetUIIfExist("GemSelectUI") as GemSelectUI;

        if (gemSelectUI != null && GemUI.instance != null)
        {
            gemSelectUI.Refresh((int)GemUI.instance.equipCurr, GemUI.instance.slotCurr);
        }
        string text = string.Format(GameDataUtils.GetChineseContent(505157, false), msg.count, GameDataUtils.GetItemName(msg.typeId, true, 0L));

        UIManagerControl.Instance.ShowToastText(text, 2f, 2f);
        EventDispatcher.Broadcast(EventNames.EquipDetailedShouldCheckBadge);
        this.CheckCanShowWearingGemPromoteWay();
    }
Beispiel #4
0
 private void Awake()
 {
     base.AwakeBase(BindingContext.BindingContextMode.MonoBinding, false);
     GemSelectUI.instance = this;
     this.gemList         = new List <Transform>();
 }