mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
61 lines
1.6 KiB
C#
61 lines
1.6 KiB
C#
// <auto-generated>ControllerLoaderGenerator</auto-generated>
|
|
|
|
using System;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using HeavenStudio.InputSystem;
|
|
using HeavenStudio.InputSystem.Loaders;
|
|
using Debug = UnityEngine.Debug;
|
|
|
|
namespace HeavenStudio
|
|
{
|
|
partial class PlayerInput
|
|
{
|
|
|
|
public static int InitInputControllers()
|
|
{
|
|
|
|
inputDevices = new List<InputController>();
|
|
InputController[] controllers;
|
|
PlayerInputRefresh = new();
|
|
PlayerInputCleanUp = null;
|
|
|
|
controllers = InputJoyshockInitializer.Initialize();
|
|
if (controllers != null)
|
|
{
|
|
inputDevices.AddRange(controllers);
|
|
}
|
|
else
|
|
{
|
|
Debug.Log("InputJoyshockInitializer.Initialize had no controllers to initialize.");
|
|
}
|
|
|
|
controllers = InputKeyboardInitializer.Initialize();
|
|
if (controllers != null)
|
|
{
|
|
inputDevices.AddRange(controllers);
|
|
}
|
|
else
|
|
{
|
|
Debug.Log("InputKeyboardInitializer.Initialize had no controllers to initialize.");
|
|
}
|
|
|
|
controllers = InputMouseInitializer.Initialize();
|
|
if (controllers != null)
|
|
{
|
|
inputDevices.AddRange(controllers);
|
|
}
|
|
else
|
|
{
|
|
Debug.Log("InputMouseInitializer.Initialize had no controllers to initialize.");
|
|
}
|
|
|
|
return inputDevices.Count;
|
|
|
|
}
|
|
|
|
}
|
|
}
|