summaryrefslogtreecommitdiff
path: root/Runtime/Graphs/UnityEngine.Graphs/LogicNodeLibrary/AudioSource/AudioSourceNodes.cs
blob: 75b9f90e3789c90d7479b67c1aca87c80870f6ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace UnityEngine.Graphs.LogicGraph
{
	public class AudioSourceNodes
	{
		[Logic (typeof(AudioSource))]
		public static IEnumerator PlayOneShot (AudioSource self, AudioClip clip, float volume)
		{
			self.PlayOneShot (clip, volume);

			yield return new WaitForSeconds (clip.length);
		}
	}
}