Reviewed-on: #1 Co-authored-by: Jeremy Smitherman <Jeremysmitherman@gmail.com> Co-committed-by: Jeremy Smitherman <Jeremysmitherman@gmail.com>
27 lines
594 B
C#
27 lines
594 B
C#
using UnityEngine;
|
|
|
|
namespace Management
|
|
{
|
|
public class Services : MonoBehaviour
|
|
{
|
|
public static Services Instance { get; private set; }
|
|
public BGM BGM => bgm;
|
|
public SFX SFX => sfx;
|
|
|
|
[SerializeField] private BGM bgm;
|
|
[SerializeField] private SFX sfx;
|
|
|
|
private void Awake()
|
|
{
|
|
if (Instance != null && Instance != this)
|
|
{
|
|
Destroy(gameObject);
|
|
return;
|
|
}
|
|
|
|
Instance = this;
|
|
DontDestroyOnLoad(gameObject);
|
|
}
|
|
}
|
|
}
|