Add files via upload
This commit is contained in:
parent
310f5c8838
commit
7046716893
5 changed files with 31 additions and 5 deletions
|
@ -73,6 +73,19 @@ public class AudioManager : MonoBehaviour{
|
|||
s.source.volume = s.RandomVolume;
|
||||
s.source.PlayOneShot(s.clip);
|
||||
}
|
||||
public void PlayWithIntro(string intro, string song){
|
||||
Sounds.List s = Array.Find(soundList.sounds, sound => sound.name == intro);
|
||||
if (s == null){
|
||||
Debug.LogWarning("Sound: " + intro + " not found!");
|
||||
return;
|
||||
}
|
||||
s.source.pitch = s.RandomPitch;
|
||||
s.source.volume = s.RandomVolume;
|
||||
s.source.Play();
|
||||
|
||||
float introDuration = s.clip.length;
|
||||
Play(song, introDuration);
|
||||
}
|
||||
#endregion
|
||||
#region Pause
|
||||
public void Pause(string name){
|
||||
|
|
|
@ -170,6 +170,7 @@ public class ToolsEditor{
|
|||
progressBar.gameObject.AddComponent<LoadingProgressBar>();
|
||||
}
|
||||
|
||||
#if UNITY_2019_3_OR_NEWER
|
||||
[MenuItem("Assets/Create/Tools/Create Menu Scene")]
|
||||
static void CreateMenuScene(){
|
||||
EditorSceneManager.SaveOpenScenes();
|
||||
|
@ -528,4 +529,5 @@ public class ToolsEditor{
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue