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:
18
Assets/Scripts/AudioMainMenu.cs
Normal file
18
Assets/Scripts/AudioMainMenu.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AudioMainMenu : MonoBehaviour {
|
||||
AudioController controller;
|
||||
|
||||
void Start() {
|
||||
controller = GameObject.Find("AudioController").GetComponent<AudioController>();
|
||||
}
|
||||
|
||||
void Update() {
|
||||
//won't work in start, for some reason
|
||||
if (controller.GetPlaying("fire") == false) {
|
||||
controller.Play("fire", AudioController.Mode.LOOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user