28 lines
576 B
C#
28 lines
576 B
C#
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;
|
|
}
|
|
}
|