void Update() { GuardMushroom.ModeChange(); Dltime += Time.deltaTime; if (Dltime > 1.4f) { CPlayerManager._instance.isPush = false; CPlayerManager._instance.isPull = false; GuardMushroom.PPEnding = true; if (GuardMushroom.QueenisAllDead) { GuardMushroom.SetState(GuardMushroomState.BChase); return; } else if (GuardMushroom.SBombing) { GuardMushroom.SetState(GuardMushroomState.Sbombing); return; } GuardMushroom.SetState(GuardMushroomState.Return); return; } }
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; } }