26 lines
631 B
C#
26 lines
631 B
C#
using NUnit.Framework;
|
|
using UnityEngine;
|
|
|
|
public class SplashScreen : MonoBehaviour
|
|
{
|
|
public AudioSource yeah; // Reference to the AudioSource component for playing the sound effect
|
|
|
|
public MonoBehaviour faderScript; // Reference to the Fader script for handling the fade effect
|
|
|
|
// 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() { }
|
|
|
|
void OnFadeStarted()
|
|
{
|
|
yeah.PlayDelayed(1.0f);
|
|
}
|
|
|
|
void OnFadeComplete()
|
|
{
|
|
faderScript.Invoke("resetFader", 1.1f);
|
|
}
|
|
}
|