From 662bba73d0ccab7a58c6c751bd0c125943f6c9a3 Mon Sep 17 00:00:00 2001 From: chenyuqi <1357020360@qq.com> Date: Tue, 16 Jul 2024 14:41:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=A7=E6=83=85=E7=95=8C=E9=9D=A2=E6=8B=89?= =?UTF-8?q?=E4=BC=B8=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Art/UI/Prefab/Story/UIStoryMain.prefab | 6 +++--- .../Level/LevelFightEnd/FightWinComponent.cs | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ProjectNLD/Assets/Art/UI/Prefab/Story/UIStoryMain.prefab b/ProjectNLD/Assets/Art/UI/Prefab/Story/UIStoryMain.prefab index 95cacba807f..59036511555 100644 --- a/ProjectNLD/Assets/Art/UI/Prefab/Story/UIStoryMain.prefab +++ b/ProjectNLD/Assets/Art/UI/Prefab/Story/UIStoryMain.prefab @@ -7075,10 +7075,10 @@ RectTransform: - {fileID: 7896991221781629267} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1920, y: 1080} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &8631018267622751437 GameObject: diff --git a/ProjectNLD/Assets/Code/Scripts/Gameplay/Level/LevelFightEnd/FightWinComponent.cs b/ProjectNLD/Assets/Code/Scripts/Gameplay/Level/LevelFightEnd/FightWinComponent.cs index ac18176ac0b..d6b5f631e6a 100644 --- a/ProjectNLD/Assets/Code/Scripts/Gameplay/Level/LevelFightEnd/FightWinComponent.cs +++ b/ProjectNLD/Assets/Code/Scripts/Gameplay/Level/LevelFightEnd/FightWinComponent.cs @@ -69,6 +69,8 @@ public class FightWinComponent: MonoBehaviour { //handle.Release(); } + + //_timelinePlayable.stopped -= OnPlayableStopped; } #endregion @@ -83,7 +85,9 @@ public class FightWinComponent: MonoBehaviour await _LoadModels(); await _LoadTimeline(); await UniTask.DelayFrame(1); + _timelinePlayable.extrapolationMode = DirectorWrapMode.Hold; _timelinePlayable.Play(); + //_timelinePlayable.stopped += OnPlayableStopped; } private void _OnPauseEvent() @@ -306,6 +310,21 @@ public class FightWinComponent: MonoBehaviour return retAnimClips; } + private void OnPlayableStopped(PlayableDirector playable) + { + for (int i = 0; i < _objRoot.transform.childCount; i++) + { + var trans = _objRoot.transform.GetChild(i); + if (trans.gameObject.name.Contains("P_S")) + { + var anim = trans.GetChild(0).GetComponent(); + if (anim) + { + anim.Play("standready001"); + } + } + } + } #region API public void SetData(List charIDList)