🔦
Flashlight System - Doc
  • Flashlight System - Introduction
  • ⭐GETTING STARTED
    • Quick Start
    • Detailed Setup
  • ❓SUPPORT
    • FAQ
    • UI Text Missing?
    • Inputs / Controls
    • Adding Audio Clips
    • System Namespace
    • Flashlight Swing Tips
  • 🌀DEVELOPMENT
    • Patch Notes - V1.8
    • Roadmap
  • 📧CONTACTS
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page

Was this helpful?

  1. SUPPORT

Inputs / Controls

Inside the FlashlightController & FlashlightInteractor script you will find a method called:

void PlayerInput()
{
    //INPUT CODE
}

Inside this method is the two inputs:

  • One for turning the flashlight on and off

if (Input.GetKeyDown(FLInputManager.instance.flashlightSwitch)) //TURNING FLASHLIGHT ON/OFF
}
    //INPUTS
}

One for reloading the batteries

if (Input.GetKey(FLInputManager.instance.reloadBattery) && batteryCount >= 1)
{
    ......
}

Two more below, one for when the key is lifted to reset the UI indicator and one for toggling the inventory on and off

if (Input.GetKeyUp(FLInputManager.instance.reloadBattery))
{
    shouldUpdate = true;
}

if (Input.GetKeyDown(FLInputManager.instance.toggleFlashlightInv))
{
    ToggleInventory();
}
PreviousUI Text Missing?NextAdding Audio Clips

Last updated 1 year ago

Was this helpful?

❓