7774 【2.0.200】【开发】灵根升品显示特效
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Wednesday, July 03, 2019 |
| | | // [ Date ]: Thursday, July 04, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public readonly int quality;
|
| | | public readonly int effect;
|
| | | public readonly int uiScale; |
| | | public readonly int offsetY; |
| | | |
| | | public ReikiRootEffectConfig() |
| | | { |
| | |
| | | int.TryParse(tables[3],out effect);
|
| | |
|
| | | int.TryParse(tables[4],out uiScale); |
| | |
|
| | | int.TryParse(tables[5],out offsetY); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a2e46f2557ae97f40a17d7d92d04e4f6 |
| | | timeCreated: 1562148448 |
| | | timeCreated: 1562206024 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public int godWeaponLV_3;
|
| | | public int godWeaponLV_4;
|
| | |
|
| | | public int reikiRootEffectId
|
| | | {
|
| | | get
|
| | | {
|
| | | return (int)equipShowSwitch / 1000 % 1000;
|
| | | }
|
| | | }
|
| | |
|
| | | public int suitLevel
|
| | | {
|
| | | get
|
| | | {
|
| | | return (int)equipShowSwitch / 10 % 100;
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateData(H0102_tagCDBPlayer _serverInfo)
|
| | | {
|
| | | if (_serverInfo.socketType == ServerType.Main)
|
| | |
| | | |
| | | public EquipAppearance GetAppearance() |
| | | { |
| | | var level = PlayerDatas.Instance.baseData.equipShowSwitch / 10; |
| | | var level = PlayerDatas.Instance.baseData.suitLevel; |
| | | var isSuit = PlayerDatas.Instance.baseData.equipShowSwitch % 10 > 0; |
| | | |
| | | var appearance = GetAppearance((int)level); |
| | |
| | | case PlayerDataType.EquipShowSwitch: |
| | | UpdateAppearanceState(selectedLevel.value); |
| | | |
| | | var level = (int)PlayerDatas.Instance.baseData.equipShowSwitch / 10; |
| | | var level = (int)PlayerDatas.Instance.baseData.suitLevel; |
| | | if (level != 0 && level == selectedLevel.value) |
| | | { |
| | | var equipSet = GetEquipSet(level); |
| | |
| | | equipDirty = true; |
| | | } |
| | | |
| | | if (clientPlace.x == PlayerDatas.Instance.baseData.equipShowSwitch / 10) |
| | | if (clientPlace.x == PlayerDatas.Instance.baseData.suitLevel) |
| | | { |
| | | if (appearanceChangeEvent != null) |
| | | { |
| | |
| | | |
| | | private void UpdateAppearanceState(int level) |
| | | { |
| | | isAppearanceLevel.value = level == PlayerDatas.Instance.baseData.equipShowSwitch / 10; |
| | | isAppearanceLevel.value = level == PlayerDatas.Instance.baseData.suitLevel; |
| | | } |
| | | |
| | | private void UpdateSuitPlaces(int level, int star) |
| | |
| | |
|
| | | public class ReikiRootQualityPromoteWin : Window
|
| | | {
|
| | | [SerializeField] RawImage m_RawRole;
|
| | | [SerializeField] ScrollRect m_Scroller;
|
| | | [SerializeField] VerticalLayoutGroup m_Layout;
|
| | | [SerializeField] ReikiRootPromoteBehaviour[] m_ReikiRootBehaviours;
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | DisplayPlayer();
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShow();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void DisplayPlayer()
|
| | | {
|
| | | m_RawRole.gameObject.SetActive(true);
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_RawRole, PlayerDatas.Instance.baseData.Job);
|
| | | }
|
| | |
|
| | | private void OnClose()
|
| | | {
|
| | | if ((DateTime.Now - openTime).TotalSeconds < 2f)
|
| | |
| | | var secondaryItemId = 0; |
| | | var suitLevel = (int)PlayerDatas.Instance.loginInfo.EquipShowSwitch % 10; |
| | | var equipInfos = PlayerDatas.Instance.loginInfo.EquipInfo; |
| | | var reikiRootEffectId = (int)PlayerDatas.Instance.loginInfo.EquipShowSwitch / 1000 % 1000; |
| | | |
| | | for (int i = 0; i < equipInfos.Length; i++) |
| | | { |
| | |
| | | wingsId = wingsItemId, |
| | | fashionSecondaryId = fashionSecondary, |
| | | secondaryId = secondaryItemId, |
| | | reikiRootEffectId = reikiRootEffectId, |
| | | }; |
| | | |
| | | ceateRoleCamera.gameObject.SetActive(true); |
| | |
| | | public void ShowPlayer(RawImage rawImage, int job, bool isDialogue = false)
|
| | | {
|
| | | var apperance = equipModel.GetAppearance();
|
| | | var reikiRootEffectId = PlayerDatas.Instance.baseData.equipShowSwitch / 1000 % 1000;
|
| | | var reikiRootEffectId = PlayerDatas.Instance.baseData.reikiRootEffectId;
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = job,
|
| | |
| | | public void ShowPlayer(RawImage rawImage, int job, RoleEquipType exceptEquip)
|
| | | {
|
| | | var apperance = equipModel.GetAppearance();
|
| | | var reikiRootEffectId = PlayerDatas.Instance.baseData.equipShowSwitch / 1000 % 1000;
|
| | | var reikiRootEffectId = PlayerDatas.Instance.baseData.reikiRootEffectId;
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = job,
|
| | |
| | | HideReikiRootEffect();
|
| | | if (id != 0 && ReikiRootEffectConfig.Has(id) && clothesModel)
|
| | | {
|
| | | if (reikiRootShowPoint == null)
|
| | | if (reikiRootShowPoint == null && showPoint.parent != null)
|
| | | {
|
| | | reikiRootShowPoint = new GameObject("ReikiRootShowPoint");
|
| | | reikiRootShowPoint.transform.SetParentEx(showPoint.parent, Vector3.zero, Quaternion.identity, Vector3.one);
|
| | | reikiRootShowPoint.transform.SetParentEx(showPoint.parent, showPoint.localPosition, showPoint.rotation, showPoint.localScale);
|
| | | }
|
| | | var config = ReikiRootEffectConfig.Get(id);
|
| | | reikiRootEffect = SFXPlayUtility.Instance.Play(config.effect, reikiRootShowPoint.transform);
|
| | | reikiRootEffect = SFXPlayUtility.Instance.Play(config.effect, reikiRootShowPoint == null ? showPoint : reikiRootShowPoint.transform);
|
| | | if (reikiRootEffect != null)
|
| | | {
|
| | | var scale = config.uiScale / 100f;
|
| | | var offsetY = config.offsetY / 100f;
|
| | | reikiRootEffect.transform.localScale = Vector3.one * scale;
|
| | | reikiRootEffect.transform.localPosition = reikiRootEffect.transform.localPosition.SetY(offsetY);
|
| | | }
|
| | | }
|
| | | }
|