Ludo-3D/Assets/Scripts/Input/InputManager.cs

47 lines
924 B
C#
Raw Normal View History

2026-01-21 20:27:45 +05:30
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2026-01-21 20:27:45 +05:30
public class InputManager : MonoBehaviour, IBase, IBootLoader, IDataLoader
{
public bool IsInputEnabled
{
get;
private set;
}
2026-01-21 20:27:45 +05:30
public float DiceRolledValue
{
get;
private set;
}
public GameplayManager GameplayManager
{
get; private set;
}
public void Initialize()
{
InterfaceManager.Instance?.RegisterInterface<InputManager>(this);
}
2026-01-21 20:27:45 +05:30
public void InitializeData()
{
GameplayManager = InterfaceManager.Instance?.GetInterfaceInstance<GameplayManager>();
}
public void SetInputState(bool state)
{
IsInputEnabled = state;
}
2026-01-21 20:27:45 +05:30
public void SetDiceRollValue(int currentRolledVal)
{
DiceRolledValue = currentRolledVal;
GameplayManager.OnDiceRolled(currentRolledVal);
}
}