|
|
|
|
|
|
GetPlayerInputID(); |
|
|
|
GetPlayerDeviceDisplayName(); |
|
|
|
GetPlayerDeviceDisplayColor(); |
|
|
|
SetDisplayText(); |
|
|
|
SetDeviceDisplayText(); |
|
|
|
} |
|
|
|
|
|
|
|
void GetPlayerInputID() |
|
|
|
|
|
|
currentDeviceColor = deviceDisplayConfigurator.GetDeviceDisplayColor(playerInput.devices[0].ToString()); |
|
|
|
} |
|
|
|
|
|
|
|
void SetDisplayText() |
|
|
|
void SetDeviceDisplayText() |
|
|
|
} |
|
|
|
|
|
|
|
void SetDisconnectedDisplayText() |
|
|
|
{ |
|
|
|
playerDisplayText.SetText("Player: " + (currentPlayerID + 1) + "\n" + "Device Disconnected!"); |
|
|
|
playerDisplayText.color = new Color(1,1,1,1); |
|
|
|
} |
|
|
|
|
|
|
|
//Device Callbacks from the new Input System ----
|
|
|
|
|
|
|
|
private void OnDeviceLost() |
|
|
|
{ |
|
|
|
SetDisconnectedDisplayText(); |
|
|
|
} |
|
|
|
|
|
|
|
private void OnDeviceRegained() |
|
|
|
{ |
|
|
|
SetDeviceDisplayText(); |
|
|
|
} |
|
|
|
|
|
|
|
} |