public uint Execute(PacketDistributed ipacket)
        {
            GC_RET_ABSORB_BELLEPIECE packet = (GC_RET_ABSORB_BELLEPIECE)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (BelleData.OwnedBelleAbsorbNum != null)
            {
                if (BelleData.OwnedBelleAbsorbNum.ContainsKey(packet.Index))
                {
                    BelleData.OwnedBelleAbsorbNum[packet.Index] = packet.AbsorbSum;
                }
                else
                {
                    BelleData.OwnedBelleAbsorbNum.Add(packet.Index, packet.AbsorbSum);
                }
            }
            if (BelleOwnWindow.Instance() != null)
            {
                BelleOwnWindow.Instance().UpdateAdvanceBelleFragmentInfo();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
示例#2
0
    private void ItemClick(GameObject go)
    {
        int id;

        ItemClickGo = go;
        if (m_GoFindIdDic.TryGetValue(go, out id))
        {
            List <Tab_Belle> belles = TableManager.GetBelleByID(id);
            if (belles != null)
            {
                if (BelleData.OwnedBelleMap.ContainsKey(id))
                {
                    if (belles.Count > 0)
                    {
                        Tab_Belle belle = belles[0];
                        BelleInfoWindow.Instance().CurSellectedBelleData = belle;
                        BelleOwnWindow.SetActive(true);
                        BelleOwnWindow belleOwnwindow = BelleOwnWindow.GetComponent <BelleOwnWindow>();
                        if (belleOwnwindow != null)
                        {
                            belleOwnwindow.SetData();
                            belleOwnwindow.SetUpdateEva(true);
                            if (EffectController != null)
                            {
                                EffectController.gameObject.SetActive(false);
                            }
                        }
                    }
                }
                else
                {
                    Tab_Belle belle = belles[0];
                    BelleInfoWindow.Instance().CurSellectedBelleData = belle;
                    BelleUnOwnWindow.SetActive(true);
                    BelleUnOwnWindow belleUnOwnwindow = BelleUnOwnWindow.GetComponent <BelleUnOwnWindow>();
                    if (belleUnOwnwindow != null)
                    {
                        if (EffectController != null)
                        {
                            EffectController.gameObject.SetActive(false);
                        }
                    }
                }
            }
        }
        if (go.name.Equals("10") && BelleController.Instance().FTEIndex == 2)
        {
            BelleController.Instance().DoFTE(3);
        }
    }
示例#3
0
 void Awake()
 {
     m_Instance = this;
     if (m_freeCloseTime < 0)
     {
         m_freeCloseTime = 0;
         m_maxCloseTime  = TableManager.GetBelleCloseCost().Count;
         for (int i = 0; i < m_maxCloseTime; i++)
         {
             Tab_BelleCloseCost cost = TableManager.GetBelleCloseCostByID(i, 0);
             if (cost != null && cost.YuanBaoCost > 0)
             {
                 break;
             }
             m_freeCloseTime++;
         }
     }
 }
示例#4
0
    public void OnClickItem()
    {
        if (m_NewPlayerGuide_Step == 1)
        {
            NewPlayerGuidLogic.CloseWindow();
        }

        if (null != m_parentWindow)
        {
            m_parentWindow.OnClickBelleItem(gameObject);
        }

        if (m_NewPlayerGuide_Step == 1)
        {
            if (BelleOwnWindow.Instance())
            {
                if (BelleOwnWindow.Instance())
                {
                    // 弃用
                    //BelleOwnWindow.Instance().NewPlayerGuide(1);
                }
            }
            m_NewPlayerGuide_Step = -1;
        }

        //清理红点提示
        if (m_redTipObj.gameObject.activeSelf)
        {
            BelleConfig.SetBelleGetBitsByBit(m_belleId, '0');
            m_redTipObj.SetActive(false);
            BelleData.m_belleActiveCount--;
            if (BelleData.m_belleActiveCount < 0)
            {
                BelleData.m_belleActiveCount = 0;
            }
            if (MenuBarLogic.Instance() != null)
            {
                MenuBarLogic.Instance().UpdateBelleTip();
            }
        }
    }
示例#5
0
    /// <summary>
    /// 显示美人属性界面
    /// </summary>
    /// <param name="tabBelle"></param>
    /// <param name="isOwn"></param>
    public void ShowBelleInfoWindow(Tab_Belle tabBelle, bool isOwn)
    {
        m_curSelectedBelleData = tabBelle;
        m_unOwnBelleWin.SetActive(!isOwn);
        if (m_unOwnBelleWin.activeSelf)
        {
            BelleUnOwnWindow belleUnOwnWindow = m_unOwnBelleWin.GetComponent <BelleUnOwnWindow>();
            if (belleUnOwnWindow != null)
            {
                belleUnOwnWindow.SetUnOwnBelleInfo();
            }
        }

        m_ownBelleWin.SetActive(isOwn);
        if (m_ownBelleWin.activeSelf)
        {
            BelleOwnWindow belleOwnwindow = m_ownBelleWin.GetComponent <BelleOwnWindow>();
            if (belleOwnwindow != null)
            {
                belleOwnwindow.SetData();
                belleOwnwindow.SetUpdateEva(true);
            }
        }
    }
示例#6
0
    public void DoFTE(int index)
    {
        m_FTEIndex = index;
        switch (m_FTEIndex)
        {
        case 1:
            NewPlayerGuidLogic.OpenWindow(m_belleShowInfoBtn, 32, 269, "", "right", 0, true, false);
            break;

        case 2:
            NewPlayerGuidLogic.OpenWindow(m_belleShowInfoWin.GetComponent <BelleShowWindow>().GridParent.FindChild("10").gameObject, 160, 160,
                                          GCGame.Utils.GetDicByID(11399), "left", 2, true, true);
            break;

        case 3:
            if (BelleOwnWindow.Instance() != null)
            {
                NewPlayerGuidLogic.OpenWindow(BelleOwnWindow.Instance().AdvancePlane.transform.parent.gameObject, 160, 160, GCGame.Utils.GetDicByID(11460), "left", 0, true, true);
            }
            break;

        case 4:
            if (BelleOwnWindow.Instance() != null && BelleOwnWindow.Instance().AdvancePlane != null)
            {
                Transform tf = BelleOwnWindow.Instance().AdvancePlane.transform.Find("Once");
                if (tf != null)
                {
                    NewPlayerGuidLogic.OpenWindow(tf.gameObject, 160, 160, GCGame.Utils.GetDicByID(11461), "left", 0, true, true);
                }
            }
            break;

        case 5:
            if (BelleOwnWindow.Instance() != null)
            {
                NewPlayerGuidLogic.OpenWindow(BelleOwnWindow.Instance().AdvancePlane.transform.parent.gameObject, 160, 160, GCGame.Utils.GetDicByID(11462), "left", 0, true, true);
            }
            break;

        case 6:
            if (BelleOwnWindow.Instance() != null)
            {
                NewPlayerGuidLogic.OpenWindow(BelleOwnWindow.Instance().m_curBelleMainColorPic.gameObject, 180, 180,
                                              GCGame.Utils.GetDicByID(11463), "right", -1, true, true, false, null, null, 0, 0, true, false, () =>
                {
                    DoFTE(7);
                });
            }
            break;

        case 7:
            if (BelleOwnWindow.Instance() != null)
            {
                Transform tf = BelleOwnWindow.Instance().transform.Find("Close");
                if (tf != null)
                {
                    NewPlayerGuidLogic.OpenWindow(tf.gameObject, 160, 160, GCGame.Utils.GetDicByID(11464), "left", 0, true, true);
                }
            }
            break;
        }
    }
示例#7
0
 // Use this for initialization
 void Start()
 {
     BelleOwnWindow.SetActive(false);
     m_instance = this;
 }