protected override IEnumerator PickTarget() { while (GrubTarget == null) { GrubTarget = HelperMethods.SelectBug(); if (GrubTarget != null && GrubTarget.CompareTag("Grub") == false) { GrubTarget = null; } yield return(HelperMethods.GetWaitTime(0.5f)); } IsChasing = true; }
void FlashTarget() { Insect bug = GrubTarget.GetComponent <Insect>(); bug.FlashColors(); }