| | |
| | | //功能预告面板 |
| | | public enum FeatureNoticeEnum
|
| | | {
|
| | | Pet=6,//灵宠
|
| | | Horse=8,//坐骑
|
| | | Wing=97,//翅膀
|
| | | GossipFurnace=87,//八卦炉
|
| | | Pet = 6,//灵宠
|
| | | Horse = 8,//坐骑
|
| | | Wing = 97,//翅膀
|
| | | GossipFurnace = 87,//八卦炉
|
| | | } |
| | | |
| | | public class FeatureNoticeWin : Window |
| | |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_CloseButton.AddListener(()=> { Close(); }); |
| | | m_CloseButton.AddListener(() => { Close(); }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | if (!WindowJumpMgr.Instance.IsJumpState)//是否经历跳转打开
|
| | | {
|
| | | DefaultSelection();//获取默认选择
|
| | | } |
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | }
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | ContentDisplay();
|
| | | m_ScrollerController.JumpIndex(JumpIndex()); |
| | |
| | | {
|
| | | featuresType1.ImageSelected.SetActive(false);
|
| | | }
|
| | | featuresType1.Button.SetListener(()=> |
| | | featuresType1.Button.SetListener(() =>
|
| | | {
|
| | | if (funcId != ClickFuncID)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | #endregion |
| | | private void DefaultSelection()//获取默认选择
|
| | | {
|
| | |
| | | if (!FuncOpen.Instance.IsFuncOpen(openTag))
|
| | | {
|
| | | ClickFuncID = openTag;
|
| | | featureNoticeModel.FunctionForecastIndex = config.OpenNumber;
|
| | | return;
|
| | | }
|
| | | }
|
| | |
| | | private int JumpIndex()//Jump选中
|
| | | {
|
| | | int Index = 0;
|
| | | Index = featureNoticeModel.FunctionList.FindIndex((x)=> |
| | | Index = featureNoticeModel.FunctionList.FindIndex((x) =>
|
| | | {
|
| | | return x.FuncId == ClickFuncID;
|
| | | });
|
| | |
| | | if (functionForecastConfig == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | m_Text_ShowA.gameObject.SetActive(false);
|
| | | m_TextShowB.gameObject.SetActive(false);
|
| | | m_TextShowC.gameObject.SetActive(false);
|
| | | m_TextShowD.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Text_ShowA.gameObject.SetActive(true);
|
| | | m_TextShowB.gameObject.SetActive(true);
|
| | | m_TextShowC.gameObject.SetActive(true);
|
| | | m_TextShowD.gameObject.SetActive(true);
|
| | | }
|
| | | m_TextAdvanceName.text = functionForecastConfig.FuncName;
|
| | | DisplayIcon(ClickFuncID);
|
| | |
| | | UI3DModelExhibition.Instance.StopShowWing();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | m_FeaturesImage.gameObject.SetActive(true);
|
| | | m_FeaturesImage.SetSprite("YGWENHAO");
|
| | | m_FeaturesImage.SetNativeSize();
|
| | | return;
|
| | | }
|
| | | switch (funcID)
|
| | | {
|
| | | case (int)FeatureNoticeEnum.Pet: |
| | | case (int)FeatureNoticeEnum.Pet:
|
| | | m_RawImage1.gameObject.SetActive(true);
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(50106001);
|
| | | UI3DModelExhibition.Instance.BeginShowNPC(50106001, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_RawImage1);
|
| | |
| | | break;
|
| | | case (int)FeatureNoticeEnum.Wing:
|
| | | m_RawImage3.gameObject.SetActive(true);
|
| | | var vec3 = new Vector3(0,90,-90);
|
| | | var vec3 = new Vector3(0, 90, -90);
|
| | | int job = PlayerDatas.Instance.baseData.Job;
|
| | | if (job == 1)
|
| | | {
|
| | |
| | | m_Textschedule.gameObject.SetActive(false);
|
| | | m_ButtonGoto.gameObject.SetActive(false);
|
| | | FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
|
| | | if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber > featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
|
| | | string StrNanme = string.Empty;
|
| | | foreach (var value in functionForecastValue)
|
| | | {
|
| | | if (value.OpenNumber == functionForecastConfig.OpenNumber - 1)
|
| | | {
|
| | | StrNanme = value.FuncName;
|
| | | } |
| | | }
|
| | | m_TextUnopened.gameObject.SetActive(true);
|
| | | m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), StrNanme, functionForecastConfig.FuncName);
|
| | | return;
|
| | | }
|
| | | if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
|
| | | {
|
| | | if (funcoPenConfig.LimitMagicWeapon != 0)//法宝
|
| | | {
|
| | |
| | | {
|
| | | m_TextUnopened.text = string.Format(Language.Get("YGTask"), funcoPenConfig.LimitLV, PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
|
| | | }
|
| | | |
| | |
|
| | | return;
|
| | | }
|
| | | }
|
| | | else//等级
|
| | | {
|
| | | m_TextUnopened.gameObject.SetActive(true);
|
| | | m_TextUnopened.text= string.Format(Language.Get("YGFuncLevel"), funcoPenConfig.LimitLV,PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
|
| | | m_TextUnopened.text = string.Format(Language.Get("YGFuncLevel"), funcoPenConfig.LimitLV, PlayerDatas.Instance.baseData.LV, funcoPenConfig.LimitLV);
|
| | | return;
|
| | | }
|
| | | } |
| | |
| | | m_ButtonGoto.gameObject.SetActive(true);
|
| | | Treasure treasure;
|
| | | TreasureConfig _treasure = Config.Instance.Get<TreasureConfig>(fabaoID);
|
| | | m_ButtonGoto.SetListener(()=> |
| | | m_ButtonGoto.SetListener(() =>
|
| | | {
|
| | | var config = Config.Instance.Get<TreasureConfig>(fabaoID);
|
| | | treasureModel.selectedTreasure = fabaoID;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | double dou=Math.Round((double)treasure.exp / treasure.treasureStages[funcStage].exp,2);
|
| | | double dou = Math.Round((double)treasure.exp / treasure.treasureStages[funcStage].exp, 2);
|
| | | string str = dou * 100 + "%";
|
| | | m_Textschedule.text = string.Format(Language.Get("YGYouFB"), str);
|
| | | } |
| | | }
|
| | | }
|
| | | else
|
| | | {
|