remove old keyboard controller compat
This commit is contained in:
parent
a51f13194a
commit
ca05fc5e41
|
|
@ -121,17 +121,6 @@ namespace HeavenStudio
|
||||||
|
|
||||||
public static InputController GetInputController(int player)
|
public static InputController GetInputController(int player)
|
||||||
{
|
{
|
||||||
// Needed so Keyboard works on MacOS and Linux
|
|
||||||
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
|
|
||||||
inputDevices = new List<InputController>();
|
|
||||||
if(inputDevices.Count < 1)
|
|
||||||
{
|
|
||||||
InputKeyboard keyboard = new InputKeyboard();
|
|
||||||
keyboard.SetPlayer(1);
|
|
||||||
keyboard.InitializeController();
|
|
||||||
inputDevices.Add(keyboard);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//select input controller that has player field set to player
|
//select input controller that has player field set to player
|
||||||
//this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons)
|
//this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons)
|
||||||
//so such controllers should have a reference to the other controller in the pair
|
//so such controllers should have a reference to the other controller in the pair
|
||||||
|
|
@ -151,19 +140,6 @@ namespace HeavenStudio
|
||||||
//this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons)
|
//this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons)
|
||||||
//so such controllers should have a reference to the other controller in the pair
|
//so such controllers should have a reference to the other controller in the pair
|
||||||
//controller IDs are determined by connection order (the Keyboard is always first)
|
//controller IDs are determined by connection order (the Keyboard is always first)
|
||||||
|
|
||||||
|
|
||||||
// Needed so Keyboard works on MacOS and Linux
|
|
||||||
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
|
|
||||||
inputDevices = new List<InputController>();
|
|
||||||
if(inputDevices.Count < 1)
|
|
||||||
{
|
|
||||||
InputKeyboard keyboard = new InputKeyboard();
|
|
||||||
keyboard.SetPlayer(1);
|
|
||||||
keyboard.InitializeController();
|
|
||||||
inputDevices.Add(keyboard);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
for (int i = 0; i < inputDevices.Count; i++)
|
for (int i = 0; i < inputDevices.Count; i++)
|
||||||
{
|
{
|
||||||
if (inputDevices[i].GetPlayer() == player)
|
if (inputDevices[i].GetPlayer() == player)
|
||||||
|
|
@ -176,17 +152,6 @@ namespace HeavenStudio
|
||||||
|
|
||||||
public static void UpdateInputControllers()
|
public static void UpdateInputControllers()
|
||||||
{
|
{
|
||||||
// Needed so Keyboard works on MacOS and Linux
|
|
||||||
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
|
|
||||||
inputDevices = new List<InputController>();
|
|
||||||
if(inputDevices.Count < 1)
|
|
||||||
{
|
|
||||||
InputKeyboard keyboard = new InputKeyboard();
|
|
||||||
keyboard.SetPlayer(1);
|
|
||||||
keyboard.InitializeController();
|
|
||||||
inputDevices.Add(keyboard);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
foreach (InputController i in inputDevices)
|
foreach (InputController i in inputDevices)
|
||||||
{
|
{
|
||||||
i.UpdateState();
|
i.UpdateState();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue