using AibisDream.Kit; using UnityEngine; using System.Collections; namespace AibisDream.Test { public class BlockPuzzleTest : MonoBehaviour { void Start() { Debug.LogWarning("BlockPuzzleTest 运行中"); } public void InitBlockPuzzle() { BlockPuzzleYarnCommand.InitBlockPuzzle("Game2"); } public void UnlockBlockPuzzle() { ActionKit.Sequence() .Coroutine(() => { Debug.Log("PlayTimeline"); return TimelineCenter.Instance.PlayTimelineAsync("卡扣/卡扣解锁"); }) .Callback(() => { Debug.Log("UnlockBlockPuzzle"); BlockPuzzleYarnCommand.UnlockSystem(); }) .Start(this); } public void EnableDrag() { BlockPuzzleYarnCommand.EnableDrag(); } public void LoadShapeRack() { BlockPuzzleYarnCommand.LoadShapeRack(); } public void Open() { StartCoroutine(OpenCoroutine()); } public IEnumerator OpenCoroutine() { yield return TimelineCenter.Instance.PlayTimelineAsync(TimelineAssetRef.CablePanelExit); yield return new WaitForSeconds(0.5f); yield return TimelineCenter.Instance.PlayTimelineAsync(TimelineAssetRef.BlockPuzzleEnter); BlockPuzzleYarnCommand.UnlockSystem(); } public void Close() { } } }