title screen prompt won't switch out of mouse
This commit is contained in:
parent
1cbdbba086
commit
acb67c8813
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -51,5 +51,5 @@
|
|||
"temp/": true,
|
||||
"Temp/": true
|
||||
},
|
||||
"dotnet.defaultSolution": "HeavenStudio-AstrlJelly.sln"
|
||||
"dotnet.defaultSolution": "HeavenStudio.sln"
|
||||
}
|
||||
|
|
@ -91,8 +91,16 @@ namespace HeavenStudio.InputSystem
|
|||
|
||||
public override void UpdateState()
|
||||
{
|
||||
if (GameManager.instance == null) return;
|
||||
Camera cam = GameManager.instance.CursorCam;
|
||||
Camera cam;
|
||||
if (GameManager.instance == null || GameManager.instance.CursorCam == null)
|
||||
{
|
||||
cam = Camera.main;
|
||||
}
|
||||
else
|
||||
{
|
||||
cam = GameManager.instance.CursorCam;
|
||||
}
|
||||
if (cam == null) return;
|
||||
|
||||
hasFlicked = false;
|
||||
hasSwiped = false;
|
||||
|
|
|
|||
|
|
@ -142,15 +142,15 @@ namespace HeavenStudio
|
|||
SoundByte.PlayOneShot("ui/UIEnter");
|
||||
|
||||
var nextController = newController;
|
||||
var lastController = PlayerInput.GetInputController(1);
|
||||
|
||||
if (newController is InputMouse)
|
||||
if ((newController is InputMouse) && (lastController is not InputMouse))
|
||||
{
|
||||
Debug.Log("Mouse used, selecting keyboard instead");
|
||||
nextController = controllers[0];
|
||||
}
|
||||
Debug.Log("Assigning controller: " + newController.GetDeviceName());
|
||||
|
||||
var lastController = PlayerInput.GetInputController(1);
|
||||
if (lastController != nextController)
|
||||
{
|
||||
if (nextController == null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue