using System; using UnityEngine; namespace LobbyRelaySample.ngo { /// /// Handles any visual tasks for running the NGO minigame's intro and outro. /// public class IntroOutroRunner : MonoBehaviour { [SerializeField] private Animator m_animator; private Action m_onOutroComplete; public void DoIntro() { m_animator.SetTrigger("DoIntro"); } public void DoOutro(Action onOutroComplete) { m_onOutroComplete = onOutroComplete; m_animator.SetTrigger("DoOutro"); } /// /// Called via an AnimationEvent. /// public void OnIntroComplete() { Locator.Get.Messenger.OnReceiveMessage(MessageType.InstructionsShown, null); } /// /// Called via an AnimationEvent. /// public void OnOutroComplete() { m_onOutroComplete?.Invoke(); } } }