summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/SoundStarter.cs
blob: 0a1258eda6df2e1d967fc9506ba591c5e28520b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using UnityEngine;

public class SoundStarter : MonoBehaviour
{
	public string Name;

	public AudioClip SoundToPlay;

	public bool StopAll;

	[Range(0f, 1f)]
	public float Volume = 1f;

	public void Awake()
	{
		if (this.StopAll)
		{
			SoundManager.Instance.StopAllSound();
		}
		SoundManager.Instance.CrossFadeSound(this.Name, this.SoundToPlay, this.Volume, 1.5f);
	}
}