void Update() { QueenMushroom.GoToPullPush(); QueenMushroom.PlayerisDead(); QueenMushroom.TimeToHeal(); QueenMushroom.GoToDestination(QueenMushroom.Player.position, QueenMushroom.MStat.MoveSpeed, QueenMushroom.rotAnglePerSecond); if (QueenMushroom.GetDistanceFromPlayer() < QueenMushroom.MStat.AttackDistance) { QueenMushroom.GoToPullPush(); if (QueenMushroom.AttackTimer > QueenMushroom.AttackDelay) { QueenMushroom.SetState(QueenMushroomState.Attack); return; } } else { QueenMushroom.SetState(QueenMushroomState.Return); return; } }
void Update() { Dltime += Time.deltaTime; QueenMushroom.GoToPullPush(); QueenMushroom.PlayerisDead(); QueenMushroom.TurnToDestination(); QueenMushroom.TimeToHeal(); if (Dltime > 1.5f) { if (QueenMushroom.GetDistanceFromPlayer() > QueenMushroom.MStat.AttackDistance) { QueenMushroom.SetState(QueenMushroomState.Chase); Dltime = 0; return; } else { QueenMushroom.SetState(QueenMushroomState.Return); Dltime = 0; return; } } }
void Update() { QueenMushroom.GoToPullPush(); QueenMushroom.PlayerisDead(); QueenMushroom.TimeToHeal(); if (QueenMushroom.GetDistanceFromPlayer() < QueenMushroom.MStat.AttackDistance) { if (QueenMushroom.AttackTimer > QueenMushroom.AttackDelay) { QueenMushroom.SetState(QueenMushroomState.Attack); return; } } if (QueenMushroom.GetDistanceFromPlayer() < QueenMushroom.MStat.ChaseDistance && QueenMushroom.GetDistanceFromPlayer() > QueenMushroom.MStat.AttackDistance) { QueenMushroom.SetState(QueenMushroomState.Chase); return; } }