Safe System - Doc
  • Safe System - Introduction
  • ⭐GETTING STARTED
    • Quick Start
    • Detailed Setup
  • ❓SUPPORT
    • FAQ
    • Unlock Event
    • Adding Audio Clips
    • System Namespace
    • Adding Trigger Event
    • Where are the Inputs?
    • When Opened Issue?
    • Combination Numbers Issue?
    • Using Different Character Controller
  • 🌀DEVELOPMENT
    • Patch Notes - V1.4
    • Roadmap
  • 📧CONTACTS
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page
  • Where is the input reference?
  • Changing the Input:
  1. SUPPORT

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();
    }
}
PreviousAdding Trigger EventNextWhen Opened Issue?

Last updated 1 year ago

❓