mirror of
https://github.com/Ratstail91/Keep-It-Alive.git
synced 2025-11-29 02:24:27 +11:00
Added audio, it's finished
This commit is contained in:
@@ -5,12 +5,16 @@ using UnityEngine.SceneManagement;
|
||||
|
||||
public class Claws : MonoBehaviour {
|
||||
SpriteRenderer spriteRenderer;
|
||||
AudioController audioController;
|
||||
|
||||
void Awake() {
|
||||
spriteRenderer = GetComponent<SpriteRenderer>();
|
||||
audioController = GameObject.Find("AudioController").GetComponent<AudioController>();
|
||||
|
||||
StartCoroutine(FadeOverTime(2f));
|
||||
StartCoroutine(SwitchScenesAfter("MainMenu", 5f));
|
||||
|
||||
audioController.StopAll();
|
||||
}
|
||||
|
||||
IEnumerator FadeOverTime(float delay) {
|
||||
|
||||
@@ -4,9 +4,14 @@ using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class FireGoesOut : MonoBehaviour {
|
||||
AudioController audioController;
|
||||
|
||||
void Awake() {
|
||||
//TODO: play extinguished sound
|
||||
audioController = GameObject.Find("AudioController").GetComponent<AudioController>();
|
||||
|
||||
StartCoroutine(SwitchScenesAfter("MainMenu", 3f));
|
||||
|
||||
audioController.StopAll();
|
||||
}
|
||||
|
||||
IEnumerator SwitchScenesAfter(string sceneName, float delay) {
|
||||
|
||||
Reference in New Issue
Block a user