Where are the Inputs?

Where is the input reference?

There are THREE input reference in this package and it is located below:

  • SafeInteractor script has an input for interacting with objects with the raycast

  • SafeController script has an input for opening and closing the keypads

  • SafeTrigger script for closing the keypads from trigger events

  • Edit the input keys in the SafeInputManager script

Changing the Input:

KPInputManager:

public class SafeInputManager : MonoBehaviour
{
        [Header("Safe Interaction")]
        public KeyCode openKey;
        
        [Header("Close Safe Interaction")]
        public KeyCode closeKey;

        [Header("Trigger Safe Interaction")]
        public KeyCode triggerInteractKey;

        public static SafeInputManager instance;
}

SafeController:

private void Update()
{
    if (!canClose && isInteracting && Input.GetKeyDown(SafeInputManager.instance.closeKey))
    {
        CloseSafeUI();
    }
}

SafeInteractor:

if (safe != null)
{
    if (Input.GetKeyDown(SafeInputManager.instance.interactKey))
    {
         safe.ShowSafeLock();
    }
}

SafeTrigger:

void ShowSafeInput()
{
    if (canUse && Input.GetKeyDown(SafeInputManager.instance.triggerInteractKey))
    {
        SafeUIManager.instance.SetInteractPrompt(false);
        _safeItemController.ShowSafeLock();
    }
}

Last updated