28 lines
655 B
C#
28 lines
655 B
C#
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<Animator>();
|
|
if(animator != null)
|
|
{
|
|
AnimatorStateInfo stateInfo = gameObject.GetComponent<Animator>().GetCurrentAnimatorStateInfo(0);
|
|
return stateInfo.length;
|
|
}
|
|
|
|
return 0.0f;
|
|
}
|
|
}
|