| | |
| | | namespace Snxxz.UI
|
| | | { |
| | | //功能预告面板 |
| | | public enum FeatureNoticeEnum
|
| | | {
|
| | | Pet=6,//灵宠
|
| | | Horse=8,//坐骑
|
| | | Wing=97,//翅膀
|
| | | GossipFurnace=87,//八卦炉
|
| | | } |
| | | |
| | | public class FeatureNoticeWin : Window |
| | | { |
| | | [SerializeField] Text m_TextAdvanceName;//功能名 |
| | |
| | | [SerializeField] Text m_TextUnopened;//未开启 |
| | | [SerializeField] Text m_Textschedule;//进度 |
| | | [SerializeField] Button m_ButtonGoto; |
| | | [SerializeField] RawImage m_RawImage1;
|
| | | [SerializeField] RawImage m_RawImage2;
|
| | | [SerializeField] RawImage m_RawImage3;
|
| | | [SerializeField] RawImage m_RawImage4; |
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } } |
| | | FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } } |
| | | #region Built-in |
| | |
| | | }
|
| | | protected override void OnPreClose() |
| | | {
|
| | | UI3DModelExhibition.Instance.StopShowNPC(); |
| | | UI3DModelExhibition.Instance.StopShowHourse();
|
| | | UI3DModelExhibition.Instance.StopShowWing(); |
| | | UI3DTreasureExhibition.Instance.StopShow(); |
| | | }
|
| | | protected override void OnAfterClose() |
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
|
| | |
| | | if (featureNoticeModel.redPointStre1.state == RedPointState.Simple)
|
| | | {
|
| | | featureNoticeModel.redPointStre1.state = RedPointState.None;
|
| | | } |
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void treasureStageUpEvent(int obj)
|
| | | {
|
| | | ContentDisplay();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | |
| | | #endregion |
| | | private void DefaultSelection()//获取默认选择
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | | m_TextAdvanceName.text = functionForecastConfig.FuncName;
|
| | | m_FeaturesImage.SetSprite(functionForecastConfig.Icon);
|
| | | DisplayIcon(ClickFuncID);
|
| | | string[] StrList = ConfigParse.GetMultipleStr(functionForecastConfig.Content);
|
| | | if (StrList.Length > 0)
|
| | | {
|
| | |
| | | {
|
| | | TrailerClassification(ClickFuncID);
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | private void DisplayIcon(int funcID)//显示图标或者模型
|
| | | {
|
| | | m_RawImage1.gameObject.SetActive(false);
|
| | | m_RawImage2.gameObject.SetActive(false);
|
| | | m_RawImage3.gameObject.SetActive(false);
|
| | | m_RawImage4.gameObject.SetActive(false);
|
| | | m_FeaturesImage.gameObject.SetActive(false);
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
|
| | | switch (funcID)
|
| | | {
|
| | | case (int)FeatureNoticeEnum.Pet:
|
| | | UI3DModelExhibition.Instance.StopShowHourse();
|
| | | UI3DModelExhibition.Instance.StopShowWing();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | 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.Horse:
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | UI3DModelExhibition.Instance.StopShowWing();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | m_RawImage2.gameObject.SetActive(true);
|
| | | HorseConfig _model = Config.Instance.Get<HorseConfig>(100);
|
| | | UI3DModelExhibition.Instance.BeginShowHourse(_model.Model, m_RawImage2);
|
| | | break;
|
| | | case (int)FeatureNoticeEnum.Wing:
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | UI3DModelExhibition.Instance.StopShowHourse();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | m_RawImage3.gameObject.SetActive(true);
|
| | | var vec3 = new Vector3(0,90,-90);
|
| | | int job = PlayerDatas.Instance.baseData.Job;
|
| | | if (job == 1)
|
| | | {
|
| | | var config = Config.Instance.Get<WingRefineExpConfig>(3711);
|
| | | int _modelID = config.Model;
|
| | | UI3DModelExhibition.Instance.BeginShowWing(_modelID, vec3, m_RawImage3);
|
| | | }
|
| | | else if (job == 1)
|
| | | {
|
| | | var config = Config.Instance.Get<WingRefineExpConfig>(3721);
|
| | | int _modelID = config.Model;
|
| | | UI3DModelExhibition.Instance.BeginShowWing(_modelID, vec3, m_RawImage3);
|
| | | }
|
| | | break;
|
| | | case (int)FeatureNoticeEnum.GossipFurnace:
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | UI3DModelExhibition.Instance.StopShowHourse();
|
| | | UI3DModelExhibition.Instance.StopShowWing();
|
| | | m_RawImage4.gameObject.SetActive(true);
|
| | | UI3DTreasureExhibition.Instance.BeginShowTreasure(301, m_RawImage4);
|
| | | break;
|
| | | default:
|
| | | m_FeaturesImage.gameObject.SetActive(true);
|
| | | m_FeaturesImage.SetSprite(functionForecastConfig.Icon);
|
| | | break;
|
| | |
|
| | | }
|
| | | } |
| | | void TrailerClassification(int funcID)//预告分类
|
| | | {
|
| | | m_TextTurnedOn.gameObject.SetActive(false);
|
| | |
| | | |
| | | private void MagicWeapon(int fabaoID)
|
| | | {
|
| | | m_Textschedule.gameObject.SetActive(true);
|
| | | m_ButtonGoto.gameObject.SetActive(true);
|
| | | Treasure treasure;
|
| | | TreasureConfig _treasure = Config.Instance.Get<TreasureConfig>(fabaoID);
|
| | |
| | | });
|
| | | if (treasureModel.TryGetTreasure(fabaoID, out treasure)
|
| | | && treasure.state == TreasureState.Collected)
|
| | | {
|
| | | m_Textschedule.gameObject.SetActive(true);
|
| | | { |
| | | var list = treasure.treasureStages;
|
| | | var funcStage = 0;
|
| | | for (int i = 0; i < list.Count; i++)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp + "%";
|
| | | }
|
| | | |
| | | string str = ((float)treasure.exp / treasure.treasureStages[funcStage].exp) * 100 + "%";
|
| | | m_Textschedule.text = string.Format(Language.Get("YGYouFB"), str);
|
| | | } |
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_TextUnopened.gameObject.SetActive(true);
|
| | | m_TextUnopened.text = string.Format(Language.Get("FuncFBOpen"), _treasure.Name);
|
| | | m_Textschedule.text = string.Format(Language.Get("YGNoFB"), _treasure.Name);
|
| | | }
|
| | | } |
| | | } |