Пример #1
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_SYNC_FELLOW_BREEDINGINFO packet = (GC_SYNC_FELLOW_BREEDINGINFO)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.LastProcreateTime = packet.Lastprocreatetime;
            GameManager.gameManager.PlayerDataPool.GoneProcreateTime = packet.GoneProcreateTime;
            if (PartnerFrameLogic_Breeding.Instance() != null)
            {
                PartnerFrameLogic_Breeding.Instance().UpdateFellowInfo_Button();
                PartnerFrameLogic_Breeding.Instance().UpdateFellowInfo_Window(false);
            }
            if (MenuBarLogic.Instance() != null)
            {
                MenuBarLogic.Instance().UpdateFellowRedTip();
            }
            if (PartnerFrameLogic.Instance() != null)
            {
                PartnerFrameLogic.Instance().UpdateFellowTip();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
 public void OnChooseBtnClick()
 {
     if (PartnerFrameLogic_Breeding.Instance() != null)
     {
         PartnerFrameLogic_Breeding.Instance().OnPartnerChooseOKClick(m_fellow);
     }
 }
Пример #3
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_FELLOW_BREEDING_LOCK packet = (GC_FELLOW_BREEDING_LOCK)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (PartnerFrameLogic_Breeding.Instance() != null)
            {
                PartnerFrameLogic_Breeding.Instance().HandleFellowBreedingLock();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #4
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_FELLOW_FRIEND_BREEDING packet = (GC_FELLOW_FRIEND_BREEDING)ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.FriendBreedingFellowInfo.InitInfo(packet);
            if (PartnerFrameLogic_Breeding.Instance() != null)
            {
                PartnerFrameLogic_Breeding.Instance().HandleFellowFriendBreeding();
            }
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #5
0
    void OnEnable()
    {
        m_Instance = this;

        if (PartnerFrameLogic.Instance() != null)
        {
            PartnerFrameLogic.Instance().HidePartnerList();
        }

        m_BreedingViewport.sourceCamera = UICamera.mainCamera;

        UpdateFellowInfo_Button();
        UpdateFellowInfo_Window();

        InvokeRepeating("UpdateRemainTime", 0, 1);
    }
        public uint Execute(PacketDistributed ipacket)
        {
            GC_BEGINENTERBREEDING packet = (GC_BEGINENTERBREEDING )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            if (PartnerFrameLogic_Breeding.Instance() != null)
            {
                PartnerFrameLogic_Breeding.Instance().ShowBeginTips();
            }

            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #7
0
    void OnDisable()
    {
        m_Instance = null;

        if (false == GameManager.gameManager.PlayerDataPool.IsProcreateGoing() &&
            m_LockBreeding)
        {
            OnUnLockBreedingClick();
            HandleFellowBreedingUnLock();
        }

        m_BabyFellow        = null;
        m_BabyFellowBuffer  = null;
        m_FellowIndex       = 0;
        m_FellowIndexBuffer = 0;
        DestroyPartnerFakeObj();
        DestroyFriendPartnerFakeObj();
        m_LockBreeding = false;

        CancelInvoke("UpdateRemainTime");
    }
Пример #8
0
    public void NewPlayerGuide(int index)
    {
        if (index < 0)
        {
            return;
        }
        m_NewPlayerGuideFlag_Step = index;
        switch (index)
        {
        case 1:
            //NewPlayerGuidLogic.OpenWindow(m_CloseButton, 200, 80, StrDictionary.GetClientDictionaryString("#{2867}"), "bottomleft", 0, true, true);
            NewPlayerGuidLogic.OpenWindow_Circle(m_GuidePoint, 100, "", "left", 0, true, true);
            break;

        case 2:    // 召唤
        case 15:   // 升星点击宠物
        {
            Transform itemTrans = m_PartnerListGrid.transform.FindChild("00");
            if (itemTrans)
            {
                PartnerFrameItemLogic FellowItem = itemTrans.GetComponent <PartnerFrameItemLogic>();
                if (FellowItem)
                {
                    NewPlayerGuidLogic.OpenWindow(FellowItem.gameObject, 270, 110, Utils.GetDicByID(10420), "right", 0, true, true);
                }
            }
        }
        break;

        case 3:
            if (MenuBarLogic.Instance())
            {
                MenuBarLogic.Instance().NewPlayerGuide(101);
            }
            m_NewPlayerGuideFlag_Step = -1;
            break;

        case 4:     // 强制点击画面中心空格
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Skill.Instance().m_LearnSkillAddSkillBook.gameObject, 70, 80, "", "left", 0, true, true);
            break;

        case 5:     // 强制选中第一本技能书(任务需要)
            Transform skillbookItem = PartnerFrameLogic_Skill.Instance().m_SkillChooseGrid.transform.FindChild("00");
            if (skillbookItem != null)
            {
                NewPlayerGuidLogic.OpenWindow(skillbookItem.FindChild("ChooseButton").gameObject, 145, 50, "", "left", 0, true, true);
            }
            else
            {
                NewPlayerGuideFlag_Step = -1;
            }
            break;

        case 6:    // 点击学习
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Skill.Instance().m_LearnSkillWindow.transform.FindChild("LearnSkillButton").gameObject, 160, 65, "", "left", 0, true, true);
            break;

        case 7:    // 学习成功,关闭界面
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Skill.Instance().m_LearnSkillCloseButton, 50, 50, "", "left", 0, true, true);
            NewPlayerGuideFlag_Step = -1;
            break;

        case 12:    // 学习技能引导,点击技能分页
            NewPlayerGuidLogic.OpenWindow(m_TabController.GetTabButtonObj("Button3-Skill"), 160, 70, Utils.GetDicByID(11425), "left", 0, true, true);
            break;

        case 13:    // 强制点击【学习技能】,后接4
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Skill.Instance().m_LearnSkillOpenButton.gameObject, 160, 65, "", "left", 0, true, true);
            break;

        case 14:     // 伙伴升星,强制点开升星分页,加提示文字(字典号11425)
            NewPlayerGuidLogic.OpenWindow(m_TabController.GetTabButtonObj("Button2-Develop"), 160, 70, Utils.GetDicByID(11425), "left", 0, true, true);
            break;

        case 16:     // 引导点击升星按钮
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Star.Instance().m_StarButton, 160, 65, "", "left", 0, true, true);
            break;

        case 17:     // 引导点击狗粮宠物(狗粮宠物默认放在最左侧第一个宠物格位置)(字典号11426)
            GameObject FTEFellow = PartnerFrameLogic_Star.Instance().m_ChooseMaterialGrid.transform.FindChild("a41").gameObject;
            if (FTEFellow != null)
            {
                NewPlayerGuidLogic.OpenWindow(FTEFellow, 68, 78, Utils.GetDicByID(11426), "left", 0, true, true);
            }
            break;

        case 18:     // 引导点击升星确认按钮
            GameObject OKBtn = PartnerFrameLogic_Star.Instance().m_ChooseMaterialWindow.transform.FindChild("OkButon").gameObject;
            if (OKBtn != null)
            {
                NewPlayerGuidLogic.OpenWindow(OKBtn, 160, 65, "", "left", 0, true, true, false, null, () =>
                {
                    m_NewPlayerGuideFlag_Step = -1;
                });
            }
            break;

        case 20:     // 1.指向左侧标签中的宠物宝宝11454;
            GameObject babyItem = null;
            foreach (Transform item in m_PartnerListGrid.GetComponent <UIGrid>().GetChildList())
            {
                if (item.GetComponent <PartnerFrameItemLogic>().FellowInfo.GetFellowType() == (int)FELLOWTYPE.BABY)
                {
                    babyItem = item.gameObject;
                    break;
                }
            }
            if (babyItem != null)
            {
                NewPlayerGuidLogic.OpenWindow(babyItem, 270, 110, Utils.GetDicByID(11454), "right", 2);
            }
            NewPlayerGuideFlag_Step = -1;
            break;

        case 21:     // 2.指向宝宝属性中的“繁殖次数”位置,说明升级到15级之后,宝宝拥有克隆次数11455
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Info.Instance().m_ProCreateLabel.gameObject, 150, 40, Utils.GetDicByID(11455),
                                          "left", -1, true, true, false, null, null, 0, 0, true, false, () =>
            {
                NewPlayerGuidLogic.CloseWindow();
            });
            NewPlayerGuideFlag_Step = -1;
            break;

        case 22:     //完成1次宠物克隆(任务描述中说明步骤,且当玩家带有这个任务打开宠物界面的时候,1.指向【克隆】分页,2,指向加号,说明需要组队完成
            NewPlayerGuidLogic.OpenWindow(m_TabController.GetTabButtonObj("Button4-Bleeding"), 160, 70, Utils.GetDicByID(11456), "left", 2);
            NewPlayerGuideFlag_Step = -1;
            break;

        case 23:     //2,指向加号,说明需要组队完成
            NewPlayerGuidLogic.OpenWindow(PartnerFrameLogic_Breeding.Instance().m_PushPartnerButton, 310, 300, Utils.GetDicByID(11457), "left", 2);
            NewPlayerGuideFlag_Step = -1;
            break;

        default:
            break;
        }
    }