This commit is contained in:
CortexCore
2024-03-31 23:31:00 +08:00
parent e179d2eb53
commit b7b89ee71a
641 changed files with 31286 additions and 22134 deletions

View File

@@ -0,0 +1,35 @@
using NodeCanvas.Framework;
using UnityEngine.Playables;
namespace BITKit.NodeCanvas.Timeline
{
public class PlayTimeline : ActionTask<PlayableDirector>
{
public BBParameter<bool> waitUntilFinish;
protected override void OnExecute()
{
base.OnExecute();
if(waitUntilFinish.value)
{
agent.stopped += OnPlayEnd;
}
agent.time = 0;
agent.Play();
}
protected override void OnStop()
{
base.OnStop();
if (waitUntilFinish.value)
{
agent.stopped -= OnPlayEnd;
}
}
private void OnPlayEnd(PlayableDirector obj)
{
EndAction();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f6ebe65ed10e28f4698926ce5306025e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: