controller support in opening
This commit is contained in:
parent
b7000de9cc
commit
70f2901e4f
|
|
@ -1243,15 +1243,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'If you''re coming from an older version of Heaven Studio, copy your settings
|
||||
config over from
|
||||
|
||||
AWWWWWWW BWWWWWWW CWWWWWW DWWWWWWW
|
||||
|
||||
to
|
||||
|
||||
AWWWWWWW
|
||||
BWWWWWWW CWWWWWW DWWWWWWW'
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: e5f3069ff426f2546b8168857ad6e0d4, type: 2}
|
||||
m_sharedMaterial: {fileID: 1618155055176292627, guid: e5f3069ff426f2546b8168857ad6e0d4, type: 2}
|
||||
|
|
|
|||
|
|
@ -96,11 +96,24 @@ namespace HeavenStudio
|
|||
|
||||
IEnumerator WaitAndFinishOpening()
|
||||
{
|
||||
WaitUntil wait = new WaitUntil(() => Input.anyKeyDown || (timer >= 8));
|
||||
WaitUntil wait = new WaitUntil(() => CheckForInput() || (timer >= 8));
|
||||
yield return wait;
|
||||
OnFinishDisclaimer(0.35f);
|
||||
}
|
||||
|
||||
bool CheckForInput()
|
||||
{
|
||||
var controllers = PlayerInput.GetInputControllers();
|
||||
foreach (var newController in controllers)
|
||||
{
|
||||
if (newController.GetLastButtonDown(true) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnFinishDisclaimer(float fadeDuration = 0)
|
||||
{
|
||||
openingAudio.Stop();
|
||||
|
|
|
|||
Loading…
Reference in a new issue