private void Awake() { // Default the input lock to unlocked _inputLockStatus = InputLockStatus.Unlocked; if (instance == null) { instance = this; } else if (instance != null) { Debug.Log("Found an existing instance of the InputManager, destroying this one"); DestroyImmediate(this); } switch (_inputType) { case GameplayInputType.PC: { gameInput = new PCInput(); break; } case GameplayInputType.Mobile: { Debug.LogError("Selected input type is not supported!"); break; } } }
public void UnlockInput() { _inputLockStatus = InputLockStatus.Unlocked; }
public void LockInput() { _inputLockStatus = InputLockStatus.Locked; }