Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | public readonly int Quality;
|
| | | public readonly int FightPower;
|
| | | public readonly string equipNameIcon;
|
| | | public readonly string equips;
|
| | | public readonly int effectId;
|
| | | public readonly int requireIconEffect; |
| | | |
| | |
| | |
|
| | | equipNameIcon = tables[11];
|
| | |
|
| | | int.TryParse(tables[12],out effectId); |
| | | equips = tables[12];
|
| | |
|
| | | int.TryParse(tables[13],out requireIconEffect); |
| | | int.TryParse(tables[13],out effectId); |
| | |
|
| | | int.TryParse(tables[14],out requireIconEffect); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d49ca04ff4a91bc4fb645c417f9ef0b3 |
| | | timeCreated: 1552531605 |
| | | timeCreated: 1552548022 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | private void OnEquipPreview()
|
| | | {
|
| | |
|
| | | RealmEquipPreviewWin.selectRealmLevel = realmLevel;
|
| | | WindowCenter.Instance.Open<RealmEquipPreviewWin>();
|
| | | }
|
| | | }
|
| | | } |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, March 14, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RealmEquipPreviewWin : Window
|
| | | {
|
| | | [SerializeField] RawImage m_RawPlayer;
|
| | | [SerializeField] Image m_EquipName;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | public static int selectRealmLevel = 0;
|
| | |
|
| | | RealmModel model { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Close.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void Display()
|
| | | {
|
| | | var config = RealmConfig.Get(selectRealmLevel);
|
| | | m_EquipName.SetSprite(config.equipNameIcon);
|
| | |
|
| | |
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | int[] equips = null;
|
| | | model.TryGetRealmPreviewEquips(selectRealmLevel, job, out equips);
|
| | |
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_RawPlayer, new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = job,
|
| | | clothesId = equips != null && equips.Length > 0 ? equips[0] : 0,
|
| | | weaponId = equips != null && equips.Length > 1 ? equips[1] : 0,
|
| | | secondaryId = equips != null && equips.Length > 2 ? equips[2] : 0,
|
| | | suitLevel = 1,
|
| | | });
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a9d590a96045b4d468ca4e5a772cb9d0 |
| | | timeCreated: 1552546225 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] RawImage m_RawBoss;
|
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] UIEffect m_OpenEffect;
|
| | |
|
| | | const string State_EnterHash = "Show";
|
| | | const string State_IdleHash = "Idle";
|
| | |
| | | this.realmLevel = realmLevel;
|
| | |
|
| | | DisplayBase();
|
| | | DisplayBoss();
|
| | |
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | m_OpenEffect.Play();
|
| | |
|
| | | StartCoroutine(Co_DisplayBoss());
|
| | | }
|
| | |
|
| | | void DisplayBase()
|
| | |
| | | var label = UIHelper.AppendColor(satisfy ? TextColType.LightGreen : TextColType.Red, fightPower.ToString());
|
| | | m_FightPower.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.LightGreen,
|
| | | Language.Get("RolePromoteBetterFight")), label, "/", config.FightPower);
|
| | | var npcConfig = NPCConfig.Get(config.BossID);
|
| | | m_BossName.text = npcConfig.charName;
|
| | | }
|
| | |
|
| | | IEnumerator Co_DisplayBoss()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS1800;
|
| | | DisplayBoss();
|
| | | }
|
| | |
|
| | | void DisplayBoss()
|
| | |
| | | });
|
| | |
|
| | | var npcConfig = NPCConfig.Get(config.BossID);
|
| | | m_BossName.text = npcConfig.charName;
|
| | |
|
| | | var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
|
| | | if (npcModel != null)
|
| | |
| | | public void Dispose()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | StopAllCoroutines();
|
| | | }
|
| | |
|
| | | private void GotoBoss()
|
| | |
| | | [SerializeField] RealmUpCondition m_BossCondition;
|
| | | [SerializeField] Transform m_ContainerCost;
|
| | | [SerializeField] ItemBehaviour m_Item;
|
| | | [SerializeField] Text m_RequireRealmLevel;
|
| | | [SerializeField] Button m_LevelUp;
|
| | |
|
| | | int realmLevel = 0;
|
| | |
| | | m_ContainerCondition.gameObject.SetActive(isNext);
|
| | | m_ContainerCost.gameObject.SetActive(isNext);
|
| | | m_LevelUp.gameObject.SetActive(isNext);
|
| | | m_RequireRealmLevel.gameObject.SetActive(!isNext);
|
| | |
|
| | | if (isNext)
|
| | | {
|
| | | DisplayCondition();
|
| | | DisplayCost();
|
| | | }
|
| | | else
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel - 1);
|
| | | m_RequireRealmLevel.text = Language.Get("RealmLevelUpRequire", config.Img);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public void DisplayBoss(int realmLevel)
|
| | | {
|
| | | var config = RealmConfig.Get(realmLevel);
|
| | | m_Condition.text = Language.Get("RealmConditionBoss", config.Name);
|
| | | var label = UIHelper.GetRealmColorByLv(realmLevel, StringUtility.Contact("[", config.Name, "]"));
|
| | | m_Condition.text = Language.Get("RealmConditionBoss", label);
|
| | | var progress = model.isBossPass ? 1 : 0;
|
| | | m_Progress.text = StringUtility.Contact(progress, "/", 1);
|
| | | m_Progress.color = model.isBossPass ? UIHelper.s_LightGreen : UIHelper.s_DarkRedColor;
|
| | |
| | | public class RealmModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize
|
| | | {
|
| | | Dictionary<int, Dictionary<int, int>> m_RealmProperties = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, Dictionary<int, int[]>> m_RealmPreviewEquips = new Dictionary<int, Dictionary<int, int[]>>();
|
| | | List<List<int>> m_RealmStages = new List<List<int>>();
|
| | | public int realmMaxLevel { get; private set; }
|
| | | public bool isBossPass { get; private set; }
|
| | |
| | | stages.Add(config.Lv + 1);
|
| | | }
|
| | | }
|
| | |
|
| | | if (!string.IsNullOrEmpty(config.equips))
|
| | | {
|
| | | var json = LitJson.JsonMapper.ToObject(config.equips);
|
| | | Dictionary<int, int[]> dict = new Dictionary<int, int[]>();
|
| | | foreach (var jobKey in json.Keys)
|
| | | {
|
| | | var job = int.Parse(jobKey);
|
| | | var equipArray = LitJson.JsonMapper.ToObject<int[]>(json[jobKey].ToJson());
|
| | | dict.Add(job, equipArray);
|
| | | }
|
| | | m_RealmPreviewEquips.Add(config.Lv, dict);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetRealmPreviewEquips(int level, int job, out int[] equips)
|
| | | {
|
| | | equips = null;
|
| | | if (m_RealmPreviewEquips.ContainsKey(level))
|
| | | {
|
| | | return m_RealmPreviewEquips[level].TryGetValue(job, out equips);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsUnlockEquipRealm(int realmLevel, out int level)
|
| | | {
|
| | | level = 0;
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Thursday, March 14, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RealmRestraintWin : Window
|
| | | {
|
| | | [SerializeField] Button m_Confirm;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_Confirm.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 437cef43d1a9a6647ad35dc25ee0c6c6 |
| | | timeCreated: 1552549504 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] Button m_GotoBoss;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | [SerializeField] PositionTween m_RealmBriefTween;
|
| | | [SerializeField] PositionTween m_RealmLevelUpTween;
|
| | |
|
| | | RealmState m_RealmState = RealmState.LevelUp;
|
| | | RealmState realmState
|
| | | {
|
| | |
| | | {
|
| | | m_Close.onClick.AddListener(OnBack);
|
| | | m_GotoBoss.AddListener(GotoBoss);
|
| | | m_RealmRestraint.AddListener(RealmRestraint);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | m_RealmState = RealmState.LevelUp;
|
| | | HideRealmBoss();
|
| | | DisplayRealmUp();
|
| | |
|
| | | m_RealmBriefTween.Play();
|
| | | m_RealmLevelUpTween.Play();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | {
|
| | | m_ContainerRealmUp.gameObject.SetActive(false);
|
| | | m_RealmAnimation.StopRotate();
|
| | | m_RealmBriefTween.Stop();
|
| | | m_RealmBriefTween.SetEndState();
|
| | | m_RealmLevelUpTween.Stop();
|
| | | m_RealmLevelUpTween.SetEndState();
|
| | | foreach (var item in m_RealmStages)
|
| | | {
|
| | | item.Dispose();
|
| | |
| | | }
|
| | |
|
| | | var config = RealmConfig.Get(model.selectRealm - 1);
|
| | | m_GotoBoss.gameObject.SetActive(requireLevelUp && config != null && config.BossID != 0);
|
| | | m_GotoBoss.gameObject.SetActive(model.selectRealm == realmLevel + 1 && config != null && config.BossID != 0);
|
| | | }
|
| | |
|
| | | void DisplayRealmBrief()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void RealmRestraint()
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmRestraintWin>();
|
| | | }
|
| | |
|
| | | public enum RealmState
|
| | | {
|
| | | LevelUp,
|