25 lines
648 B
C#
25 lines
648 B
C#
using Code.DI;
|
|
using Code.Input;
|
|
using UnityEngine;
|
|
|
|
namespace Code.UI
|
|
{
|
|
public class GameplayController : MonoBehaviour
|
|
{
|
|
private IInputService _inputService;
|
|
private AudioSource _audioSource;
|
|
|
|
private void Start()
|
|
{
|
|
var container = FindFirstObjectByType<DIContainer>();
|
|
_inputService = container.Resolve<IInputService>();
|
|
_inputService.EnableMap(ActionMapping.Gameplay);
|
|
_audioSource = FindFirstObjectByType<AudioSource>();
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
_inputService.DisableMap(ActionMapping.Gameplay);
|
|
}
|
|
}
|
|
} |