Added intro screen.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class IntroSkipper : MonoBehaviour
|
||||
{
|
||||
public Intro fadeIn;
|
||||
|
||||
public Fader fadeOut;
|
||||
|
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
var keyboard = Keyboard.current;
|
||||
var mouse = Mouse.current;
|
||||
|
||||
if (keyboard != null && keyboard.anyKey.wasPressedThisFrame
|
||||
||
|
||||
mouse != null && mouse.leftButton.wasPressedThisFrame)
|
||||
{
|
||||
fadeIn.forceStopAudioCoroutine();
|
||||
fadeOut.resetFader();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user