Main/Component/UI/Effect/EffectPlayer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/Component/UI/Effect/UIEffectPlayer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/Equip/EquipCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Main/System/MainLevel/MainBossEnterWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Main/Component/UI/Effect/EffectPlayer.cs
@@ -167,7 +167,7 @@ Clear(); } public virtual void Play(bool showLog = true) public virtual void Play(bool showLog = true, bool closePMA = false) { isPlaying = true; if (!isInit) @@ -186,15 +186,17 @@ //防范effeid 为0 if (effectConfig != null && effectConfig.isSpine != 0) { PlaySpineEffect(); PlaySpineEffect(closePMA); } return; } if (effectConfig == null) return; if (EffectMgr.IsNotShowBySetting(effectId)) { return; } { return; } if (null != effectTarget) { @@ -211,7 +213,7 @@ // 加载spine特效资源 if (effectConfig.isSpine != 0) { PlaySpineEffect(); PlaySpineEffect(closePMA); } else { @@ -240,7 +242,7 @@ protected void PlaySpineEffect() protected void PlaySpineEffect(bool closePMA = false) { // 从特效预制体池获取特效 @@ -253,7 +255,7 @@ { //LoadAsset 已经有缓存SkeletonDataAsset spineComp.skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("UIEffect/" + effectConfig.packageName, effectConfig.fxName); spineComp.MeshGenerator.settings.pmaVertexColors = !closePMA; //为true时会有部分特效不显示 如主界面装备特效 spineComp.raycastTarget = false; spineComp.Initialize(true); spineComp.timeScale = speedRate; @@ -282,13 +284,17 @@ // 播放指定动画 void PlayerTheSpineAnim() { spineComp.enabled = true; var skeletonData = spineComp.Skeleton.Data; if (skeletonData.Animations.Count > 0) { //按配置或者默认第一个 int defaultAnimIndex = Math.Max(0, effectConfig.animIndex.Length == 0 ? 0 : effectConfig.animIndex[0]); if (playSpineAnimIndex >= skeletonData.Animations.Count) { playSpineAnimIndex = -1; Debug.LogError("特效:" + effectConfig.id + " 索引超出播放默认动画。 error:" + playSpineAnimIndex); } string defaultAnimationName = skeletonData.Animations.Items[playSpineAnimIndex == -1 ? defaultAnimIndex : playSpineAnimIndex].Name; spineAnimationState.SetAnimation(0, defaultAnimationName, isPlaySpineLoop); } @@ -365,12 +371,12 @@ } } public async UniTask PlayAsync(bool showLog = true) public async UniTask PlayAsync(bool showLog = true, bool closePMA = false) { await UniTask.Delay(playDelayTime); try { Play(showLog); Play(showLog, closePMA); } catch (Exception e) { Main/Component/UI/Effect/UIEffectPlayer.cs
@@ -12,20 +12,20 @@ public class UIEffectPlayer : EffectPlayer { //spine里的第几个动画 public void Play(int index, bool showLog = true) public void Play(int index, bool showLog = true, bool closePMA = false) { playSpineAnimIndex = index; PlayAsync(showLog).Forget(); PlayAsync(showLog, closePMA).Forget(); } //配置动画组数组索引 public void PlayByArrIndex(int index, bool showLog = true) public void PlayByArrIndex(int index, bool showLog = true, bool closePMA = false) { var config = EffectConfig.Get(effectId); playSpineAnimIndex = config.animIndex[index]; PlayAsync(showLog).Forget(); PlayAsync(showLog, closePMA).Forget(); } @@ -48,6 +48,5 @@ effectPlayer.SetActive(true); return effectPlayer; } } Main/System/Equip/EquipCell.cs
@@ -56,19 +56,23 @@ if (lvText != null) lvText.text = Language.Get("L1113", EquipModel.Instance.GetEquipLV(equip)); if (uieff == null) { //等美术提供装备的效果特效(需要特效图) // int effectID = EquipModel.Instance.equipUIEffects[Math.Min(equip.config.ItemColor, EquipModel.Instance.equipUIEffects.Length) - 1]; // if (effectID == 0) // { // uieff.Stop(); // } // else // { // uieff.effectId = effectID; // uieff.Play(); // } if (uieff != null) { if (equip.config.ItemColor >= 7) { uieff.effectId = 1026; uieff.PlayByArrIndex(equip.config.ItemColor - 7, true, true); } else { uieff.Stop(); } //特效参考尺寸106*150 同比例缩放 var rect = this.transform.GetComponent<RectTransform>(); uieff.transform.localScale = new Vector3(rect.sizeDelta.x / 106f, rect.sizeDelta.y / 150f, 1); } } Main/System/MainLevel/MainBossEnterWin.cs
@@ -89,7 +89,7 @@ int skillID = lineUPConfig.SkillIDExList[i]; skillWordCells[i].Init(skillID, () => { SmallTipWin.showText = SkillConfig.Get(skillID)?.Description; SmallTipWin.showText = Language.Get("SmallTipFomat",SkillConfig.Get(skillID)?.SkillName, SkillConfig.Get(skillID)?.Description) ; SmallTipWin.worldPos = CameraManager.uiCamera.ScreenToWorldPoint(Input.mousePosition); SmallTipWin.isDownShow = true; UIManager.Instance.OpenWindow<SmallTipWin>();