Ejemplo n.º 1
0
    // 默认选择
    public bool InitDefaultChoose(int nChooseLevel, bool isNextBranch)
    {
        if (TrainingLogic.Instance() == null)
        {
            return(false);
        }

        // 错 → 默认选择不会选到分支的两个点 所以只在五个点的循环 实际上应该前四个
        // 纠正 当满级时 可能选择到分支点 所以还是得都比较一边
        if (m_BranchTraining == nChooseLevel)
        {
            TrainingLogic.Instance().ShowTrainingTips(m_BranchPoint, nChooseLevel, isNextBranch);
        }
        else
        {
            for (int i = 0; i < m_TrainingPoint.Length; i++)
            {
                if (m_TrainingGroup * GlobeVar.TRAININGSTAGE_LEVELCOUNT + i + 1 == nChooseLevel)
                {
                    TrainingLogic.Instance().ShowTrainingTips(m_TrainingPoint[i], nChooseLevel, isNextBranch);
                    return(true);
                }
            }
        }

        return(false);
    }
Ejemplo n.º 2
0
    void TrainingLevelOnClick(GameObject value)
    {
        if (TrainingLogic.Instance() == null)
        {
            return;
        }

        if (m_BranchPoint == value)
        {
            TrainingLogic.Instance().ShowTrainingTips(value, m_BranchTraining);
        }
        else
        {
            for (int i = 0; i < m_TrainingPoint.Length; i++)
            {
                if (m_TrainingPoint[i] == value)
                {
                    TrainingLogic.Instance().ShowTrainingTips(value, m_TrainingGroup * GlobeVar.TRAININGSTAGE_LEVELCOUNT + i + 1);
                    break;
                }
            }
        }
    }
Ejemplo n.º 3
0
 void Awake()
 {
     m_Instance = this;
 }
Ejemplo n.º 4
0
 void OnDestroy()
 {
     m_Instance = null;
 }
Ejemplo n.º 5
0
 void OnDisable()
 {
     m_Instance = null;
 }
Ejemplo n.º 6
0
 void OnEnable()
 {
     m_Instance = this;
     m_TrainingEffect.SetActive(false);
     Init();
 }
        void OnCommonDataChange(int nIndex, int nValue)
        {
            if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_QUITTIME)
            {
                if (FunctionButtonLogic.Instance() != null)
                {
                    FunctionButtonLogic.Instance().ExitTime = nValue;
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_CJG_SWEEP_CD)
            {
                GameManager.gameManager.PlayerDataPool.CJGSweepCDTime = nValue;
                if (DungeonWindow.Instance() != null)
                {
                    DungeonWindow.Instance().UpdateTabInfo();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_COPYSCENE_SWEEP_CD)
            {
                GameManager.gameManager.PlayerDataPool.CopyeSceneSweepCDTime = nValue;
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_JXZ ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_YZW ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_ZLQJ ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_YWGM ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_NHCJ ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_SSS)
            {
                if (DungeonWindow.Instance() != null)
                {
                    DungeonWindow.Instance().UpdateTabInfo();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_SHARE_NANGUA_CODE_REWARD_COUNT)
            {
                if (ShareRootWindow.Instance() != null)
                {
                    ShareRootWindow.Instance().UpdateRewardCount();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_WISHINGWELL_TOTAL ||
                     nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_WISHINGWELL_FETCH)
            {
                if (ChargeActivityLogic_XY.Instance() != null)
                {
                    ChargeActivityLogic_XY.Instance().UpdateData();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_VIPCP_MONEYTREE)
            {
                if (MoneyTreeLogic.Instance() != null)
                {
                    MoneyTreeLogic.Instance().UpdateVipTip();
                }
            }
            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_PAOSHANG_GOTTEN_NUM)
            {
                if (MenuBarLogic.Instance() != null)
                {
                    MenuBarLogic.Instance().UpdateGuildAndMasterReserveMember();
                }
                if (PlayerFrameLogic.Instance() != null)
                {
                    PlayerFrameLogic.Instance().UpdateRemainNum();
                }
//                if (GuildWindow.Instance() != null)
//                {
//                    GuildWindow.Instance().UpdatePaoShangTip();
//                }
//                if (GuildPaoShang.Instance() != null)
//                {
//                    GuildPaoShang.Instance().UpdateMemTimesOneDay();
//                }
            }
//            else if (nIndex == (int)Games.UserCommonData.USER_COMMONDATA.CD_HONGBAO_SCORE)
//            {
//                if (MakeHongBaoWindow.Instance() != null )
//                {
//                    MakeHongBaoWindow.Instance().Score = nValue;
//                }
//            }
            else if (nIndex == (int)USER_COMMONDATA.CD_GUILDMISSION_DAILYDATA)
            {
//                if (GuildMission.Instance() != null)
//                {
//                    GuildMission.Instance().MisionData = nValue;
//                }
            }
//			else if (nIndex == (int)USER_COMMONDATA.CD_GIVEROSE_NUMBER
//			         || nIndex == (int)USER_COMMONDATA.CD_RECEIVEROSE_NUMBER )
//			{
//				if (LoverFlowerWindow.Instance() != null)
//				{
//					LoverFlowerWindow.Instance().UpdateRankNumber();
//				}
//			}
            else if (nIndex == (int)USER_COMMONDATA.CD_JUYIYITANG_GETAWARD)
            {
                if (JuYiYiTangWindow.Instance() != null)
                {
                    JuYiYiTangWindow.Instance().Init();
                }
            }
            else if (nIndex == (int)USER_COMMONDATA.CD_TRAINING_LEVEL ||
                     nIndex == (int)USER_COMMONDATA.CD_TRAINING_CHOICEDATA1 ||
                     nIndex == (int)USER_COMMONDATA.CD_TRAINING_CHOICEDATA2 ||
                     nIndex == (int)USER_COMMONDATA.CD_TRAINING_CHOICEDATA3)
            {
                if (TrainingLogic.Instance() != null)
                {
                    TrainingLogic.Instance().HandleUpdateTrainingLevel();
                }
            }
            else if (nIndex == (int)USER_COMMONDATA.CD_TRAINING_EXP)
            {
                if (TrainingLogic.Instance() != null)
                {
                    TrainingLogic.Instance().HandleUpdateTrainingExp();
                }
            }
            //else if (nIndex == (int)USER_COMMONDATA.CD_NEWSERVERACTIVITY)
            //{
            //    if (NewFunctionLogic.Instance() != null)
            //    {
            //        NewFunctionLogic.Instance().ShowNewServerActivity();
            //    }
            //}
        }