Beispiel #1
0
    void OnBoxClick()
    {
        if (false == m_BoxCanGet.activeInHierarchy)
        {
            return;
        }

        Tab_StoryCopySceneChapter tabChapter = TableManager.GetStoryCopySceneChapterByID(m_ChapterId, 0);

        if (tabChapter == null)
        {
            return;
        }

        if (m_AwardIndex < 0 || m_AwardIndex >= JuQingCopySceneData.ChapterAwardStarReq.Length)
        {
            return;
        }

        GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.ReqChapterAward(m_ChapterId, m_AwardIndex);

        if (JuQingWindow.Instance() != null && JuQingWindow.Instance().NewPlayerGuideIndex == 2)
        {
            JuQingWindow.Instance().NewPlayerGuideIndex = GlobeVar.INVALID_ID;
            if (NewPlayerGuidLogic.Instance())
            {
                NewPlayerGuidLogic.CloseWindow();
            }
        }
    }
Beispiel #2
0
    void OnEquipClick()
    {
        // 新手指引
        if (m_NewPlayerGuide_Step == 1)
        {
            NewPlayerGuidLogic.CloseWindow();
            m_NewPlayerGuide_Step = -1;
        }

        if (m_EquipBuffer.Count > 0 && null != m_EquipBuffer[0] && m_EquipBuffer[0].IsValid())
        {
            GameItem m_RealEquip = GameManager.gameManager.PlayerDataPool.BackPack.GetItemByGuid(m_EquipBuffer[0].Guid);
            if (m_RealEquip != null && m_RealEquip.IsValid())
            {
                if (m_RealEquip.BindFlag == false && m_RealEquip.GetBindType() != 0)
                {
                    MessageBoxLogic.OpenOKCancelBox(3028, 1000, OnEquipClick_OK, null);
                }
                else
                {
                    OnEquipClick_OK();
                }
            }
            else
            {
                GUIData.AddNotifyData2Client(false, StrDictionary.GetClientDictionaryString("#{3286}"));
                CloseCurEquip();
            }
        }
        else
        {
            GUIData.AddNotifyData2Client(false, StrDictionary.GetClientDictionaryString("#{3286}"));
            ClearData();
        }
    }
Beispiel #3
0
 public void ClickButton()
 {
     if (SkillRootLogic.Instance() != null)
     {
         SkillRootLogic.Instance().SelectSkillIndex = m_nSkillIndex;
         if (SkillRootLogic.Instance().CurClickBtItem != null)
         {
             SkillRootLogic.Instance().CurClickBtItem.m_SkillBakSprite.spriteName = "CommonBack6Nor";
             SkillRootLogic.Instance().CurClickBtItem.m_SkillBakSprite.MakePixelPerfect();
         }
         m_SkillBakSprite.spriteName = "CommonBack6Hov";
         m_SkillBakSprite.MakePixelPerfect();
         SkillRootLogic.Instance().CurClickBtItem = this;
         if (m_nSkillIndex != -1) //已经学习的技能
         {
             if (SkillRootLogic.Instance().NewPlayerGuide_Step == 1 && gameObject.name == "1002")
             {
                 NewPlayerGuidLogic.CloseWindow();
                 SkillRootLogic.Instance().NewPlayerGuide(2);
             }
             SkillRootLogic.Instance().ShowSkillInfo();
         }
         else //未学习的技能
         {
             SkillRootLogic.Instance().ShowNoStudySkillInfo(m_nSkillID);
         }
     }
 }
Beispiel #4
0
    /// <summary>
    /// 点击添加宝宝
    /// </summary>
    void OnChoosePartnerClick()
    {
        NewPlayerGuidLogic.CloseWindow();
        FellowContainer container = GameManager.gameManager.PlayerDataPool.FellowContainer;

        if (container == null)
        {
            return;
        }

        List <Fellow> babylist = FellowTool.FellowCanBreedingFilter(container);

        //List<Fellow> babylist = FellowTool.FellowBabyFilter(container);

        if (babylist.Count <= 0)
        {
            GUIData.AddNotifyData("#{10330}");
            return;
        }

        m_FellowIndexBuffer = m_FellowIndex;

        m_PartnerChooseWindow.SetActive(true);
        ShowChooseBabyFellow(babylist);
    }
Beispiel #5
0
    void OnKillModleClick()
    {
        if (m_nNewPlayerGuideIndex == 1)
        {
            m_nNewPlayerGuideIndex = -1;
            NewPlayerGuidLogic.CloseWindow();
        }

        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (_mainPlayer == null)
        {
            return;
        }
        if (_mainPlayer.BaseAttr.Level < 30)
        {
            _mainPlayer.SendNoticMsg(false, "#{1111}");
            return;
        }
        if (_mainPlayer.PkModle == (int)CharacterDefine.PKMODLE.KILL && m_nPKCDTime < 0)
        {
            _mainPlayer.SendNoticMsg(false, "#{1107}");
            return;
        }
        //弹出确认框
        string _strNotice = StrDictionary.GetClientDictionaryString("#{1106}");

        MessageBoxLogic.OpenOKCancelBox(_strNotice, "", SwitchKillModeOnOk, SwitchKillModeOnCancel);
        m_IsModeClick = true;
    }
Beispiel #6
0
    void OnRestaurantClick(GameObject value)
    {
        if (!GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_KEJIYUAN))
        {
            GUIData.AddNotifyData("#{10830}");
            return;
        }
        bool bRet = GameManager.gameManager.PlayerDataPool.CommonData.GetCommondFlag((int)USER_COMMONFLAG.CF_RESTAURANTFUNCTION_OPENFLAG);

        if (bRet == false)
        {
            GUIData.AddNotifyData("#{10830}");
            return;
        }
//         if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < (int)GameDefine_Globe.NEWBUTTON_LEVEL.FARM)
//         {
//             GUIData.AddNotifyData("#{10830}");
//             return;
//         }
        NewPlayerGuidLogic.CloseWindow();
        if (m_NewButton != null && m_NewButton == value)
        {
            StopNewButtonEffect();
        }
        RestaurantController.OpenWindow(true);
    }
Beispiel #7
0
 void ItemUse()
 {
     if (m_Item != null && m_Item.IsValid())
     {
         if (m_NewPlayerGuideFlag_Step == 0)
         {
             NewPlayerGuidLogic.CloseWindow();
             m_NewPlayerGuideFlag_Step = -1;
             if (BackPackLogic.Instance())
             {
                 BackPackLogic.Instance().NewPlayerGuide(2);
             }
         }
         if (null != Singleton <ObjManager> .Instance.MainPlayer &&
             Singleton <ObjManager> .Instance.MainPlayer.CheckUseItem(m_Item))
         {
             Singleton <ObjManager> .Instance.MainPlayer.UseItem(m_Item);
         }
         if (m_Item.DataID == GlobeVar.MARRY_RING_ITEMID)
         {
             if (BackPackLogic.Instance() != null)
             {
                 BackPackLogic.Instance().CloseWindow();
             }
             if (PlayerFrameLogic.Instance() != null)
             {
                 PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
             }
         }
         CloseWindow();
     }
 }
    void LeftControlClick()
    {
        if (PlayerPreferenceData.LeftTabControl == 1)
        {
            PlayerPreferenceData.LeftTabControl = 0;
            GameManager.gameManager.SoundManager.PlaySoundEffect(128);
            return;
        }
        else
        {
#if BOBJOYSTICK
            if (MissionDialogAndLeftTabsLogic.Instance() != null)
            {
                //当左侧快捷栏折叠起来时,不进行适配,以防止指针被对齐到屏幕外而消失的现象
                BobJoyUINavigator leftui = MissionDialogAndLeftTabsLogic.Instance().GetComponent <BobJoyUINavigator>();
                leftui.enabled = false;
                UIRootJoyControllerHelper.Instance.setState(UIRootJoyControllerHelper.JoyUIState.NONE);
            }
#endif
            NewPlayerGuidLogic.CloseWindow();
            PlayerPreferenceData.LeftTabControl = 1;
            GameManager.gameManager.SoundManager.PlaySoundEffect(8);
            return;
        }
    }
 void OnTabClick(TabButton button)
 {
     NewPlayerGuidLogic.CloseWindow();
     if (mCurFTEIndex == 1)
     {
         DoFTE(2);
     }
 }
Beispiel #10
0
    /// <summary>
    /// 完成任务
    /// </summary>
    void MissionComplete()
    {
        NewPlayerGuidLogic.CloseWindow();
        GameManager.gameManager.MissionManager.CompleteMission(m_CurMissionID);

        UIManager.CloseUI(UIInfo.MissionInfoController);
        GameManager.gameManager.SoundManager.PlaySoundEffect(135);
    }
Beispiel #11
0
 public void OnFellowClick(GameObject value)
 {
     NewPlayerGuidLogic.CloseWindow();
     if (m_NewButton != null && m_NewButton == value)
     {
         StopNewButtonEffect();
     }
     UIManager.ShowUI(UIInfo.PartnerFrameRoot);
 }
Beispiel #12
0
 void OnBelleClick(GameObject value)
 {
     NewPlayerGuidLogic.CloseWindow();
     if (m_NewButton != null && m_NewButton == value)
     {
         StopNewButtonEffect();
     }
     UIManager.ShowUI(UIInfo.Belle);
 }
Beispiel #13
0
    void OnEnable()
    {
        UpdatePVPInfo();
        PVPData.delUpdateMyData += UpdatePVPInfo;

        if (NewPlayerGuidLogic.Instance())
        {
            NewPlayerGuidLogic.CloseWindow();
        }
    }
Beispiel #14
0
 // 关闭2级界面,隐藏菜单栏
 static void CloseUI()
 {
     UIManager.NewPlayerGuideCloseSubUI();
     NewPlayerGuidLogic.CloseWindow();
     // 隐藏菜单栏
     if (PlayerFrameLogic.Instance() && PlayerFrameLogic.Instance().Fold == false)
     {
         PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
     }
 }
Beispiel #15
0
 public void OnBackPackClick()
 {
     NewPlayerGuidLogic.CloseWindow();
     BackPackLogic.m_OpenWay = BackPackLogic.OPEN_WAY.MENU_BACKPACK;
     UIManager.ShowUI(UIInfo.BackPackRoot, BackPackLogic.SwitchEquipPackView);
     if (m_NewPlayerGuideIndex == 3 && BackPackLogic.Instance())
     {
         NewPlayerGuidLogic.CloseWindow();
     }
 }
    void OnBoxClick()
    {
        if (false == m_BoxCanGet.activeInHierarchy)
        {
            return;
        }

        Tab_StoryCopySceneChapter tabChapter = TableManager.GetStoryCopySceneChapterByID(m_ChapterId, 0);

        if (tabChapter == null)
        {
            return;
        }

        if (m_AwardIndex < 0 || m_AwardIndex >= tabChapter.getLevelAwardCount())
        {
            return;
        }

        GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.ReqChapterLevelAward(m_ChapterId, m_AwardIndex);

        if (JuQingWindow.Instance() != null && JuQingWindow.Instance().NewPlayerGuideIndex == 1)
        {
            if (GameManager.gameManager.PlayerDataPool.JuQingCopySceneData != null)
            {
                // 算总星星数的 应该可以提出个函数来
                List <StoryCopySceneChapterInfo> chapterInfoList = GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.GetChapterInfoList();
                if (chapterInfoList == null || chapterInfoList.Count <= 0)
                {
                    JuQingWindow.Instance().NewPlayerGuideIndex = GlobeVar.INVALID_ID;
                    NewPlayerGuidLogic.CloseWindow();
                    return;
                }

                int nTotalStarCount = 0;
                StoryCopySceneChapterInfo currentChapterInfo = chapterInfoList[0];
                for (int i = 0; i < currentChapterInfo._ContaindLevelList.Count; i++)
                {
                    int levelID    = currentChapterInfo._ContaindLevelList[i];
                    int nStarCount = GameManager.gameManager.PlayerDataPool.JuQingCopySceneData.GetLevelByLevelID(levelID).GetStarCount();
                    nTotalStarCount += nStarCount;
                }

                if (nTotalStarCount < JuQingCopySceneData.ChapterAwardStarReq[0])
                {
                    JuQingWindow.Instance().NewPlayerGuideIndex = GlobeVar.INVALID_ID;
                    NewPlayerGuidLogic.CloseWindow();
                    return;
                }

                JuQingWindow.Instance().NewPlayerGuide(2);
            }
        }
    }
Beispiel #17
0
 void OnDrag(Vector2 delta)
 {
     //m_SkillBarSwitch.Drag(delta);
     m_Turntable.Drag(delta);
     if (SkillBarLogic.Instance() && SkillBarLogic.Instance().NewPlayerGuide_Step == 4)
     {
         NewPlayerGuidLogic.CloseWindow();
         SkillBarLogic.Instance().NewPlayerGuide_Step = -1;
         GameManager.gameManager.PlayerDataPool.ForthSkillFlag = false;
     }
 }
Beispiel #18
0
 void OnBuyBatchClick_Normal()
 {
     if (SysShopController.Instance() != null)
     {
         if (m_NewPlayerGuideFlag_Step == 1)
         {
             m_NewPlayerGuideFlag_Step = -1;
             NewPlayerGuidLogic.CloseWindow();
         }
         SysShopController.Instance().BuyBatchCurItem();
     }
 }
 public void ItemBuyBatchClick()
 {
     if (SysShopController.Instance() != null)
     {
         if (SysShopController.Instance().m_NewPlayerGuide_Step == 1)
         {
             SysShopController.Instance().m_NewPlayerGuide_Step = -1;
             NewPlayerGuidLogic.CloseWindow();
         }
         SysShopController.Instance().BuyBatchCurItem();
     }
 }
Beispiel #20
0
 void OnStrenClick(GameObject value)
 {
     if (m_NewPlayerGuideIndex == 0)
     {
         NewPlayerGuidLogic.CloseWindow();
     }
     if (m_NewButton != null && m_NewButton == value)
     {
         StopNewButtonEffect();
     }
     UIManager.ShowUI(UIInfo.EquipStren);
 }
Beispiel #21
0
 public void CloseWindow()
 {
     if (m_NewPlayerGuideIndex == 101)
     {
         m_NewPlayerGuideIndex = -1;
         NewPlayerGuidLogic.CloseWindow();
     }
     if (PlayerFrameLogic.Instance() != null)
     {
         bgTween.Reset();
         PlayerFrameLogic.Instance().PlayerFrameHeadOnClick();
     }
 }
 void Check_NewPlayerGuide()
 {
     if (SkillBarLogic.Instance() != null && SkillBarLogic.Instance().NewPlayerGuide_Step == 3)
     {
         SkillBarLogic.Instance().NewPlayerGuide_Step = 0;
         NewPlayerGuide(1);
     }
     if (SkillBarLogic.Instance() != null && SkillBarLogic.Instance().NewPlayerGuide_Step == 5)
     {
         SkillBarLogic.Instance().NewPlayerGuide_Step = 0;
         NewPlayerGuidLogic.CloseWindow();
     }
 }
Beispiel #23
0
    public void NewPlayerGuide(int nIndex)
    {
        m_NewPlayerGuide_Step = nIndex;
        switch (nIndex)
        {
        case 0:     //打开宝石tab指引
            if (m_TabButtonList.Count > (int)CONTENT_TYPE.CONTENT_TYPE_GEM &&
                (int)CONTENT_TYPE.CONTENT_TYPE_GEM >= 0 &&
                m_TabButtonList[(int)CONTENT_TYPE.CONTENT_TYPE_GEM])
            {
                NewPlayerGuidLogic.OpenWindow(m_TabButtonList[(int)CONTENT_TYPE.CONTENT_TYPE_GEM].gameObject, 160, 70, Utils.GetDicByID(10417), "left", 0, true, true);
            }
            break;

        case 1:     //选中装备
        {
            NewPlayerGuidLogic.OpenWindow(m_EquipSlotIcon[1].gameObject, 100, 100, Utils.GetDicByID(10413), "left", 0, true, true);
        }
        break;

        case 2:
            m_NewPlayerGuide_Step = -1;
            break;

        case 3:
            NewPlayerGuidLogic.OpenWindow_Circle(m_BtnClose, 100, "", "bottom", 0, true, true);
            break;

        case 4:
            NewPlayerGuidLogic.CloseWindow();
            if (MenuBarLogic.Instance())
            {
                MenuBarLogic.Instance().NewPlayerGuide(101);
            }
            m_NewPlayerGuide_Step = -1;
            break;

        case 5:
            m_NewPlayerGuide_Step = -1;
            break;

        case 6:     //打开宝石tab指引
            if (m_TabButtonList.Count > (int)CONTENT_TYPE.CONTENT_TYPE_GEM &&
                (int)CONTENT_TYPE.CONTENT_TYPE_GEM >= 0 &&
                m_TabButtonList[(int)CONTENT_TYPE.CONTENT_TYPE_GEM])
            {
                NewPlayerGuidLogic.OpenWindow(m_TabButtonList[(int)CONTENT_TYPE.CONTENT_TYPE_GEM].gameObject, 160, 70, "", "bottom", 0, true, true);
            }
            break;
        }
    }
Beispiel #24
0
    void OnGuildClick()
    {
        //七天版本屏蔽功能
//         GUIData.AddNotifyData("#{10830}");
//         return;

        if (m_NewPlayerGuideIndex == 8)
        {
            NewPlayerGuidLogic.CloseWindow();
            m_NewPlayerGuideIndex = -1;
        }

        UIManager.ShowUI(UIInfo.GuildRoot);
    }
Beispiel #25
0
    public void CloseWindow()
    {
        m_Item = null;
        //gameObject.SetActive(false);

        // 新手指引如果还在 直接干掉
        if (m_NewPlayerGuideFlag_Step != 0 && NewPlayerGuidLogic.Instance())
        {
            m_NewPlayerGuideFlag_Step = GlobeVar.INVALID_ID;
            NewPlayerGuidLogic.CloseWindow();
        }

        UIManager.CloseUI(UIInfo.ItemTooltipsRoot);
    }
    public void NewPlayerGuide(int index)
    {
        if (index < 0)
        {
            return;
        }
        m_NewPlayerGuideFlag_Step = index;
        switch (index)
        {
        case 0:
            NewPlayerGuidLogic.OpenWindow(m_TabController.transform.Find("Btn2-AutoFight").gameObject, 270, 110, StrDictionary.GetClientDictionaryString("#{11540}"), "bottom", 0, true, true);
            break;

        case 1:
            NewPlayerGuidLogic.OpenWindow(m_AutoFight, 900, 250,
                                          GCGame.Utils.GetDicByID(11541), "bottom", -1, true, true, false, null, null, -0.1f, 0.2f, true, false, () =>
            {
                NewPlayerGuide(2);
            });
            break;

        case 2:
            NewPlayerGuidLogic.OpenWindow(m_AutoFight, 900, 250,
                                          GCGame.Utils.GetDicByID(11542), "top", -1, true, true, false, null, null, -0.1f, -0.4f, true, false, () =>
            {
                NewPlayerGuide(3);
            });
            break;

        case 3:
            NewPlayerGuidLogic.OpenWindow(AutoFightLogic.Instance().m_RightHightLight.transform.parent.gameObject, 270, 110, "", "top", 0, true, true);
            break;

        case 4:
            NewPlayerGuidLogic.OpenWindow(m_AutoFight, 900, 300,
                                          GCGame.Utils.GetDicByID(11543), "bottom", -1, true, true, false, null, null, -0.1f, 0.2f, true, false, () =>
            {
                NewPlayerGuide(5);
            });
            break;

        case 5:
            m_NewPlayerGuideFlag_Step = -1;
            NewPlayerGuidLogic.CloseWindow();
            break;

        default:
            break;
        }
    }
 void OnCloseClick()
 {
     if (m_NewPlayerGuide_Step == 2)
     {
         if (MenuBarLogic.Instance())
         {
             MenuBarLogic.Instance().NewPlayerGuide(101);
         }
     }
     UIManager.CloseUI(UIInfo.Restaurant);
     if (NewPlayerGuidLogic.Instance() != null)
     {
         NewPlayerGuidLogic.CloseWindow();
     }
 }
Beispiel #28
0
 public void OnClose(GameObject go)
 {
     gameObject.SetActive(false);
     if (EffectRoot != null)
     {
         EffectRoot.SetActive(true);
     }
     if (BelleController.Instance() != null)
     {
         if (BelleController.Instance().FTEIndex == 7)
         {
             NewPlayerGuidLogic.CloseWindow();
         }
     }
     ReFreshBelleState();
 }
Beispiel #29
0
 public void ToggleButtonClick()
 {
     if (m_NewPlayerGuide_Step == 1)
     {
         m_NewPlayerGuide_Step = 0;
         NewPlayerGuidLogic.CloseWindow();
     }
     if (m_IsAutoFight == true)
     {
         //  m_AutoBeiginName.text = StrDictionary.GetClientDictionaryString("#{1444}");
     }
     else
     {
         //  m_AutoBeiginName.text = StrDictionary.GetClientDictionaryString("#{1194}");
     }
     AutoFightOK();
     //UIManager.CloseUI(UIInfo.SystemAndAutoFight);
 }
 // 点击MissionItem
 void MissionItemClicked()
 {
     if (NewPlayerGuidLogic.IsOpenFlag)
     {
         NewPlayerGuidLogic.CloseWindow();
     }
     if (GameManager.gameManager.MissionManager != null)
     {
         GameManager.gameManager.MissionManager.MissionPathFinder(m_MissionID);
     }
     Games.LogicObj.Obj_MainPlayer mainPalyer = Singleton <ObjManager> .Instance.MainPlayer;
     if (null != mainPalyer && null != mainPalyer.SkillCore &&
         mainPalyer.SkillCore.UsingSkillBaseInfo != null &&
         mainPalyer.SkillCore.UsingSkillBaseInfo.IsMoveBreak == 1)
     {
         mainPalyer.SkillCore.BreakCurSkill();
     }
 }