28 lines
868 B
C#
28 lines
868 B
C#
using System;
|
|
using Code.Debug;
|
|
using Code.Infrastructure.Audio;
|
|
using Reflex.Attributes;
|
|
using UnityEngine;
|
|
|
|
namespace Code.Infrastructure.UI.Panels
|
|
{
|
|
public class MenuChoosePanel : UIPanel
|
|
{
|
|
[Inject] IAudioService _audioService;
|
|
[SerializeField] private SceneChooser sceneChooser;
|
|
public void PlaySelectSound() => _audioService.PlayOneShot(AudioNames.UISounds, 7);
|
|
public void PlayDeselectSound() => _audioService.PlayOneShot(AudioNames.UISounds, 8);
|
|
public void PlayClickSound() => _audioService.PlayOneShot(AudioNames.UISounds, 1);
|
|
public override void Open(Action callback = null)
|
|
{
|
|
sceneChooser.EnableButtons();
|
|
callback?.Invoke();
|
|
}
|
|
|
|
public override void Close(Action callback = null)
|
|
{
|
|
|
|
callback?.Invoke();
|
|
}
|
|
}
|
|
} |