hch
2025-08-15 7bd85eb8d0b9664f4645534b42c82ab0f32754d3
Main/Component/UI/Effect/UIEffectPlayer.cs
@@ -22,6 +22,8 @@
    int playSpineAnimIndex = -1; //播放spine特效动画索引,
    protected override void OnEnable()
    {
        playSpineAnimIndex = -1;
@@ -31,13 +33,17 @@
        }
        else if (spineComp != null)
        {
            //隐藏,会有静态显示问题
            spineComp.enabled = false;
            if (!isPlaying)
            {
                //隐藏,会有静态显示问题
                spineComp.enabled = false;
            }
        }
    }
    public override void Play(bool showLog = true)
    {
        isPlaying = true;
        if (!isInit)
        {
            InitComponent(showLog);
@@ -51,7 +57,7 @@
                this.gameObject.SetActive(true);
            }
            if (effectConfig.isSpine != 0)
            {
            {
                PlayerTheSpineAnim();
            }
            return;
@@ -80,7 +86,7 @@
            PlaySpineEffect();
        }
        else
        {
        {
            PlayerEffect(false);
        }
        SoundPlayer.Instance.PlayUIAudio(effectConfig.audio);
@@ -142,7 +148,7 @@
    }
    async UniTask PlayAsync(bool showLog = true)
    {
    {
        await UniTask.Delay(playDelayTime);
        Play(showLog);
    }
@@ -171,6 +177,7 @@
        if (!isPlaySpineLoop)
        {
            spineComp.enabled = false;
            isPlaying = false;
            if (isReleaseImmediately)
            {
                Stop();
@@ -204,4 +211,5 @@
        return effectPlayer;
    }
}