using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class AgeIndication : MonoBehaviour { public UnityAction OnCompleteHide; public void OnCompleteAgeIndicationHide() { OnCompleteHide?.Invoke(); Destroy(gameObject); } public float GetFadeoutAnimationLength() { Animator animator = gameObject.GetComponent(); if(animator != null) { AnimatorStateInfo stateInfo = gameObject.GetComponent().GetCurrentAnimatorStateInfo(0); return stateInfo.length; } return 0.0f; } }