GameJam Progress Day 2
This commit is contained in:
27
Assets/Scripts/UI/DebugAudio.cs
Normal file
27
Assets/Scripts/UI/DebugAudio.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DebugAudio : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
public MusicManager musicManager;
|
||||
public AudioClip[] audioClips;
|
||||
public bool current = true;
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void OnMouseDown()
|
||||
{
|
||||
this.musicManager.CrossfadeToTrack(this.current ? this.audioClips[0] : this.audioClips[1]);
|
||||
this.current = !this.current;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user