Ejemplo n.º 1
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);
         }
     }
 }
Ejemplo n.º 2
0
    public void UpdateRemainNum()
    {
        int nShowNum = m_CurRemindNum;

        //nShowNum += RestaurantData.m_restaurantTipsCount;
        nShowNum += BelleData.GetBelleTipCount();
        //nShowNum += GetPartnerTipCount();
        nShowNum += SkillRootLogic.GetCanLevUpSkillCount();
        //nShowNum += GetMasterAndGuildTipCount();
        nShowNum += GetSystemLogicTipCount();         // 系统提示
        nShowNum += GetGemHoleCanOpenCount(1);        //宝石40开孔
        nShowNum += GetGemHoleCanOpenCount(2);        //宝石70开孔
        nShowNum += GetGemHoleCanOpenCount(3);        //宝石90开孔
        nShowNum += GetPartnerSkillCanLevelUpCount(); //宠物技能升级
        if (null != GameManager.gameManager.PlayerDataPool)
        {
            nShowNum += GameManager.gameManager.PlayerDataPool.m_objMountParam.MountRemindFlagCount();
        }

//
//         bool bRet = GameManager.gameManager.PlayerDataPool.CommonData.GetCommondFlag((int)USER_COMMONFLAG.CF_AUTOENHANCE_OPENFLAG);
//         GameManager.gameManager.PlayerDataPool.CommonData.AskSetCommonFlag((int)USER_COMMONFLAG.CF_AUTOENHANCE_OPENFLAG, true
        if (nShowNum > 0 && GameManager.gameManager.RunningScene != (int)Games.GlobeDefine.GameDefine_Globe.SCENE_DEFINE.SCENE_FB_CABALINTRO)
        {
            m_RemindNum.SetActive(true);
            //m_RemindNumLabel.text = nShowNum.ToString();
        }
        else
        {
            m_RemindNum.SetActive(false);
        }
    }
Ejemplo n.º 3
0
 void ReleaseButton()
 {
     if (m_SkillIconSprite.GetComponent <UIDragObject>().enabled == false)
     {
         return;
     }
     if (SkillRootLogic.Instance() != null)
     {
         SkillRootLogic.Instance().ReleaseButtonDragSprite(m_nSkillIndex);
     }
 }
Ejemplo n.º 4
0
    public void UpdateButtonInfo(int nSkillIndex)
    {
        m_nSkillIndex = nSkillIndex;
        Obj_MainPlayer _mainPlayer = Singleton <ObjManager> .GetInstance().MainPlayer;

        if (_mainPlayer == null)
        {
            return;
        }
        if (m_nSkillIndex >= 0 && m_nSkillIndex < _mainPlayer.OwnSkillInfo.Length)
        {
            int         nSkillId = _mainPlayer.OwnSkillInfo[m_nSkillIndex].SkillId;
            Tab_SkillEx _skillEx = TableManager.GetSkillExByID(nSkillId, 0);
            if (_skillEx != null)
            {
                Tab_SkillBase _skillBase = TableManager.GetSkillBaseByID(_skillEx.BaseId, 0);
                if (_skillBase != null)
                {
                    //师门技能显示自定义名字
                    if ((_skillBase.SkillClass & (int)SKILLCLASS.MASTERSKILL) != 0)
                    {
                        m_SkillNameLabel.text = GameManager.gameManager.PlayerDataPool.GetMasterSkillName(nSkillId);
                        if (m_SkillNameLabel.text == "")
                        {
                            m_SkillNameLabel.text = _skillBase.Name;
                        }
                    }
                    else
                    {
                        m_SkillNameLabel.text = _skillBase.Name;
                    }
                    m_nSkillID     = nSkillId;
                    m_nSkillBaseId = _skillEx.BaseId;
                    m_SkillIconSprite.spriteName = _skillBase.Icon;
                    m_SkillIconSprite.MakePixelPerfect();
                    m_SkillLevLabel.text = StrDictionary.GetClientDictionaryString("#{2162}", _skillEx.Level);
                    //是否要显示升级提醒的角标
                    if (SkillRootLogic.IsCanLevelUpSkill(nSkillId) ||
                        SkillRootLogic.IsCanLevelUpMasterSkill(nSkillId))
                    {
                        m_LevelTipsIcon.SetActive(true);
                    }
                    else
                    {
                        m_LevelTipsIcon.SetActive(false);
                    }
                }
            }
        }
    }
Ejemplo n.º 5
0
    void PressButton()
    {
        if (m_SkillIconSprite.GetComponent <UIDragObject>().enabled == false)
        {
            return;
        }

        if (SkillRootLogic.Instance() != null)
        {
            UISprite DragSprite = SkillRootLogic.Instance().m_SkillButtonDragSprite;
            DragSprite.transform.localPosition = DragSprite.transform.parent.InverseTransformPoint(m_SkillIconSprite.transform.position);
            DragSprite.spriteName = m_SkillIconSprite.spriteName;
            DragSprite.MakePixelPerfect();
            DragSprite.gameObject.SetActive(true);
        }
    }
Ejemplo n.º 6
0
 public void UpdateSkillTip()
 {
     if (null == m_SkillCountTip)
     {
         return;
     }
     if (SkillRootLogic.GetCanLevUpSkillCount() > 0)
     {
         m_SkillCountTip.gameObject.SetActive(true);
         //  m_SkillCountTip.text = SkillRootLogic.GetCanLevUpSkillCount().ToString();
     }
     else
     {
         m_SkillCountTip.gameObject.SetActive(false);
     }
 }