Files
Barrack-Unity/Assets/Scripts/SplashScreen/SplashScreen.cs
T

25 lines
617 B
C#
Raw Normal View History

2026-06-24 10:40:48 -04:00
using UnityEngine;
2026-06-24 14:01:18 -04:00
public class SplashScreen : FadeCallback
2026-06-24 10:40:48 -04:00
{
public AudioSource yeah; // Reference to the AudioSource component for playing the sound effect
2026-06-24 14:01:18 -04:00
public Fader faderScript; // Reference to the Fader script for handling the fade effect
2026-06-24 10:40:48 -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() { }
2026-06-24 14:01:18 -04:00
public override void OnFadeStarted()
2026-06-24 10:40:48 -04:00
{
yeah.PlayDelayed(1.0f);
}
2026-06-24 14:01:18 -04:00
public override void OnFadeComplete()
2026-06-24 10:40:48 -04:00
{
2026-06-24 14:01:18 -04:00
faderScript.resetFader();
2026-06-24 10:40:48 -04:00
}
}