From 5f728e2633e8e20ebafc4e534fe7e7362362c839 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 04 十二月 2025 11:58:07 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Component/UI/Effect/UIEffectPlayer.cs | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Main/Component/UI/Effect/UIEffectPlayer.cs b/Main/Component/UI/Effect/UIEffectPlayer.cs
index a7aba56..5d70f0f 100644
--- a/Main/Component/UI/Effect/UIEffectPlayer.cs
+++ b/Main/Component/UI/Effect/UIEffectPlayer.cs
@@ -13,7 +13,7 @@
{
- //spine閲岀殑绗嚑涓姩鐢�
+ //spine閲岀殑绗嚑涓姩鐢伙紝锛侊紒closePMA鍙傛暟鏃犳晥鏆傛椂鐣欑潃
public void Play(int index, bool showLog = true, bool closePMA = false)
{
playSpineAnimIndex = index;
@@ -24,7 +24,7 @@
public void PlayByArrIndex(int index, bool showLog = true, bool closePMA = false)
{
var config = EffectConfig.Get(effectId);
- playSpineAnimIndex = config.animIndex[index];
+ playSpineAnimIndex = index < config.animIndex.Length ? config.animIndex[index] : 0;
PlayAsync(showLog, closePMA).Forget();
}
@@ -49,4 +49,13 @@
return effectPlayer;
}
+
+ public void SetEnabled(bool isEnable)
+ {
+ if (spineComp == null)
+ {
+ return;
+ }
+ spineComp.enabled = isEnable;
+ }
}
--
Gitblit v1.8.0