39 lines
920 B
C#
39 lines
920 B
C#
using AibisDream.Kit;
|
|
using UnityEngine;
|
|
using UnityEngine.Playables;
|
|
using System.Collections;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public class OutsideCenter : Singleton<OutsideCenter>
|
|
{
|
|
public BubbleSlotGroup bubbleSlotGroup;
|
|
public PlayableDirector director;
|
|
|
|
public override void OnSingletonInit()
|
|
{
|
|
// 加载气泡
|
|
BubbleGroup.Instance.LoadBubbles(bubbleSlotGroup.CollectData());
|
|
}
|
|
|
|
public void PlayTimeline(string timelinePath)
|
|
{
|
|
StartCoroutine(PlayTimelineCoroutine());
|
|
}
|
|
|
|
public void PlayTimelineAsync(string timelinePath)
|
|
{
|
|
director.Play();
|
|
}
|
|
|
|
public IEnumerator PlayTimelineCoroutine()
|
|
{
|
|
director.Play();
|
|
while (director.state == PlayState.Playing)
|
|
{
|
|
yield return null;
|
|
}
|
|
}
|
|
}
|
|
}
|