revival/game/Assets/Scripts/Audio/MusicTriggerZone.cs

20 lines
409 B
C#
Raw Permalink Normal View History

2021-03-24 12:50:07 +01:00
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MusicTriggerZone : MonoBehaviour
{
[SerializeField]
[Range( 1, 7 )]
private int _track = 1;
[SerializeField]
private bool _forceIfLower;
private void OnTriggerEnter( Collider other )
{
AudioManager.SetTrack( _track, _forceIfLower );
}
}