惊醒
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Playables;
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
[System.Serializable]
|
||||
public class DeepInPlayableAsset : PlayableAsset
|
||||
{
|
||||
public ExposedReference<GameObject> targetObject;
|
||||
public Sprite[] sprites;
|
||||
public float singleDuration;
|
||||
|
||||
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
|
||||
{
|
||||
var playable = ScriptPlayable<DeepInPlayableBehaviour>.Create(graph, 0);
|
||||
var behaviour = playable.GetBehaviour();
|
||||
|
||||
behaviour.targetObject = targetObject.Resolve(graph.GetResolver());
|
||||
behaviour.sprites = sprites;
|
||||
behaviour.singleDuration = singleDuration;
|
||||
|
||||
return playable;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user