public override void Awake() { animator = GetComponent <Animator>(); if (animator == null && mainPanel != null) { animator = mainPanel.GetComponent <Animator>(); } }
private bool CanTriggerAnimations() { if ((animator == null) && !lookedForAnimator) { lookedForAnimator = true; if (panel != null) { animator = panel.GetComponent <Animator>(); } } return((animator != null) && (animationTransitions != null)); }