Merge branch 'develop' into bugfix/version
This commit is contained in:
@@ -155,7 +155,7 @@ position: 250,200
|
||||
<<change_actor_state "Watch" "诊室外英理">>
|
||||
<<fade_out>>
|
||||
<<wait 2>>
|
||||
<<outside_play_timeline "TimeLine/DoctorOutSubway">>
|
||||
<<outside_play_timeline>>
|
||||
<<wait 1>>
|
||||
<<init_actor 诊室外医生 诊室外电线杆>>
|
||||
<<fade_in_actor "诊室外医生">>
|
||||
|
||||
@@ -19,38 +19,20 @@ namespace AibisDream
|
||||
|
||||
public void PlayTimeline(string timelinePath)
|
||||
{
|
||||
StartCoroutine(PlayTimelineCoroutine(timelinePath));
|
||||
StartCoroutine(PlayTimelineCoroutine());
|
||||
}
|
||||
|
||||
public void PlayTimelineAsync(string timelinePath)
|
||||
{
|
||||
var timeline = Resources.Load<PlayableAsset>(timelinePath);
|
||||
if (timeline != null)
|
||||
{
|
||||
director.playableAsset = timeline;
|
||||
director.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Timeline not found at path: {timelinePath}");
|
||||
}
|
||||
director.Play();
|
||||
}
|
||||
|
||||
public IEnumerator PlayTimelineCoroutine(string timelinePath)
|
||||
public IEnumerator PlayTimelineCoroutine()
|
||||
{
|
||||
var timeline = Resources.Load<PlayableAsset>(timelinePath);
|
||||
if (timeline != null)
|
||||
director.Play();
|
||||
while (director.state == PlayState.Playing)
|
||||
{
|
||||
director.playableAsset = timeline;
|
||||
director.Play();
|
||||
while (director.state == PlayState.Playing)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Timeline not found at path: {timelinePath}");
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace AibisDream
|
||||
public static class OutsideYarnCommand
|
||||
{
|
||||
[YarnCommand("outside_play_timeline")]
|
||||
public static IEnumerator PlayTimeline(string timelinePath)
|
||||
public static IEnumerator PlayTimeline()
|
||||
{
|
||||
yield return OutsideCenter.Instance.PlayTimelineCoroutine(timelinePath);
|
||||
yield return OutsideCenter.Instance.PlayTimelineCoroutine();
|
||||
}
|
||||
|
||||
[YarnCommand("outside_play_timeline_nowait")]
|
||||
|
||||
Reference in New Issue
Block a user