Firstborn/Assets/RPG Creation Kit/Scripts/Input/Gamepad Support/Gamepad_OnScreenCommands.cs
Schaken-Mods 959e80cf72 assets upload
assets upload description.
2023-03-28 12:16:30 -05:00

29 lines
626 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using RPGCreationKit;
using RPGCreationKit.Player;
using System;
using System.Linq;
public class Gamepad_OnScreenCommands : MonoBehaviour
{
[SerializeField] private GameObject[] commands;
private void OnEnable()
{
if(RckInput.isUsingGamepad)
{
for (int i = 0; i < commands.Length; i++)
commands[i].SetActive(true);
}
else
{
for (int i = 0; i < commands.Length; i++)
commands[i].SetActive(false);
}
}
}