Files
Barrack-Unity/Assets/Scripts/Intro/IntroSkipper.cs
T

33 lines
746 B
C#
Raw Normal View History

2026-06-24 14:01:18 -04:00
using UnityEngine;
using UnityEngine.InputSystem;
public class IntroSkipper : MonoBehaviour
{
public Intro fadeIn;
2026-07-18 23:30:43 -04:00
public Fader fadeOut = null;
2026-06-24 14:01:18 -04:00
// 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();
2026-07-18 23:30:43 -04:00
if (fadeOut != null) {
fadeOut.resetFader();
}
2026-06-24 14:01:18 -04:00
}
}
}