void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.ModeChange(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); GuardMushroom.QueenisADead(); GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond); if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance) { if (GuardMushroom.AttackTimer > GuardMushroom.AttackDelay) { GuardMushroom.SetState(GuardMushroomState.Attack); return; } } if (GuardMushroom.AttackTimer < GuardMushroom.AttackDelay && GuardMushroom.GetDistanceFromPlayer() <= GuardMushroom.MStat.AttackDistance) { GuardMushroom.SetState(GuardMushroomState.Return); return; } }
void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); GuardMushroom.QueenisADead(); Dltime += Time.deltaTime; if (Dltime > 1.5f) { if (GuardMushroom.GetDistanceFromPlayer() > GuardMushroom.MStat.AttackDistance) { GuardMushroom.SetState(GuardMushroomState.Chase); Dltime = 0; GuardMushroom.AttackTimer = 0f; return; } else { GuardMushroom.SetState(GuardMushroomState.Return); Dltime = 0; GuardMushroom.AttackTimer = 0f; return; } } }
void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.BerserkerMoveSpeed, GuardMushroom.rotAnglePerSecond); if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance && GuardMushroom.AttackTimer > GuardMushroom.BerserkerAttackDelay) { GuardMushroom.SetState(GuardMushroomState.BAttack); return; } }
void Update() { GuardMushroom.GoToPullPush(); GuardMushroom.NowisHit(); GuardMushroom.PlayerisDead(); Dltime += Time.deltaTime; if (Dltime > 0.78f) { GuardMushroom.SetState(GuardMushroomState.BChase); Dltime = 0; return; } }
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; } }