You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
664 B
25 lines
664 B
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
|
|
public class SoundPlayEvent_BGM : MonoBehaviour |
|
{ |
|
public SoundPlayer spEnabled; |
|
public SoundPlayer spDisenabled; |
|
|
|
private void OnEnable() |
|
{ |
|
if (spEnabled != null) |
|
SoundManager.Instance.BGMPlay(spEnabled.gameObject, true); |
|
} |
|
private void OnDisable() |
|
{ |
|
if (spDisenabled != null && SoundManager.Instance != null) |
|
SoundManager.Instance.BGMPlay(spDisenabled.gameObject, false); |
|
} |
|
|
|
public void FadeOut(SoundPlayer soundPlayer) |
|
{ |
|
SoundManager.Instance.BGMPlay(soundPlayer.gameObject, false); |
|
} |
|
}
|
|
|