您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
25 行
547 B
25 行
547 B
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.Playables;
|
|
using UnityEngine.Timeline;
|
|
using GameplayIngredients;
|
|
|
|
[Serializable]
|
|
public class PlayCueBehaviour : PlayableBehaviour
|
|
{
|
|
public AudioCue Cue;
|
|
|
|
public override void OnBehaviourPlay(Playable playable, FrameData info)
|
|
{
|
|
base.OnBehaviourPlay(playable, info);
|
|
if(Cue != null && Application.isPlaying)
|
|
{
|
|
Manager.Get<AudioManager>().PlayCueAsset(Cue);
|
|
}
|
|
}
|
|
|
|
public override void OnGraphStart (Playable playable)
|
|
{
|
|
|
|
}
|
|
}
|