private void methodTrigger(AnimatorTimer aTimer) { Debug.Log("iniciando metodo"); aTimer.runMethod(); Debug.Log("metodo ejecutado"); aTimer.methodTrigger -= methodTrigger; }
public void StartTimerCoroutine(float time, MethodAfterTime method) { AnimatorTimer aTimer = new AnimatorTimer(time, method); aTimer.methodTrigger += methodTrigger; aTimer.runMethodAfterTime(); }
// Start is called before the first frame update void Start() { barra = bar.GetComponent <Barra>(); controlAnim = GetComponent <AnimatorTimer>(); }