Firstborn/Assets/InfinityPBR/_InfinityPBR - Locks and Lo.../Scripts/LockDemoCommonControls.cs
Schaken-Mods b8ab71969a Finished lockpicking, tied it to the Skills system
Finished lockpicking. tied it to the Attributes system. when you pick a lock you gain dexterity, the higher your dexterity, the easier it is to pick locks.
2023-05-05 22:02:18 -05:00

36 lines
1.0 KiB
C#

using UnityEngine;
using UnityEngine.UI;
public class LockDemoCommonControls : MonoBehaviour
{
public GameObject canvasUI;
public Button[] allTextureButtons;
void Update()
{
if (Input.GetKeyDown(KeyCode.C))
canvasUI.SetActive(!canvasUI.activeSelf);
if (Input.GetKeyDown(KeyCode.Alpha1))
allTextureButtons[0].onClick.Invoke();
if (Input.GetKeyDown(KeyCode.Alpha2))
allTextureButtons[1].onClick.Invoke();
if (Input.GetKeyDown(KeyCode.Alpha3))
allTextureButtons[2].onClick.Invoke();
if (Input.GetKeyDown(KeyCode.Alpha4))
allTextureButtons[3].onClick.Invoke();
if (Input.GetKeyDown(KeyCode.Alpha5))
allTextureButtons[4].onClick.Invoke();
if (Input.GetKeyDown(KeyCode.Alpha6))
allTextureButtons[5].onClick.Invoke();
if (Input.GetKeyDown(KeyCode.Alpha7))
allTextureButtons[6].onClick.Invoke();
}
}