|
@ -12,9 +12,13 @@ public class SoundManager : MonoBehaviour { |
|
|
AudioSource curMusic; |
|
|
AudioSource curMusic; |
|
|
public void Start() |
|
|
public void Start() |
|
|
{ |
|
|
{ |
|
|
Startmusic.Play(); |
|
|
|
|
|
StartCoroutine(ChangeMusic(loopMusic, Startmusic.clip.length)); |
|
|
|
|
|
StartCoroutine(ChangeMusic(loopMusic, gameLength - 10.0f)); |
|
|
|
|
|
|
|
|
if (Startmusic != null) |
|
|
|
|
|
{ |
|
|
|
|
|
curMusic = Startmusic; |
|
|
|
|
|
Startmusic.Play(); |
|
|
|
|
|
StartCoroutine(ChangeMusic(loopMusic, Startmusic.clip.length)); |
|
|
|
|
|
StartCoroutine(ChangeMusic(loopMusic, gameLength - 10.0f)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void Update() |
|
|
private void Update() |
|
|