void Update() { GuardMushroom.TurnToDestination(); GuardMushroom.GoToPullPush(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); GuardMushroom.QueenisADead(); if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance && GuardMushroom.AttackTimer > GuardMushroom.AttackDelay) { GuardMushroom.SetState(GuardMushroomState.Attack); return; } if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.ChaseDistance && GuardMushroom.GetDistanceFromPlayer() > GuardMushroom.MStat.AttackDistance) { GuardMushroom.SetState(GuardMushroomState.Chase); return; } }