private void FixedUpdate() { if (_healther.Base.IsStunned) { return; } _mover.OnUpdate(); if (_mover.State == EState.Ready && ShiftIntervalTimer.IsDone) { if (_detector.IsPlayerDetected) { if (_detector.DistToPlayer <= _shiftDistance) { _mover.Begin(_detector.PlayerPos); } else { _mover.Begin(Stuff.PathUtil.GetNextPosToTarget(transform.position, _detector.PlayerPos)); } } else { _mover.Begin(Stuff.PathUtil.GetNextPosToRandom(transform.position)); } } }
private void FixedUpdate() { if (_healther.Base.IsStunned) { return; } _attacker.Base.OnUpdate(); _mover.OnUpdate(); if (_attacker.Base.State == EState.Ready && _attacker.IsPossible) { _attacker.Base.Begin(); _mover.ForceStop(); } if (_mover.State == EState.Ready && _attacker.Base.State == EState.Ready) { if (_detector.IsPlayerDetected) { _mover.Begin(Stuff.PathUtil.GetNextPosToTarget(transform.position, _detector.PlayerPos)); } else { _mover.Begin(Stuff.PathUtil.GetNextPosToRandom(transform.position)); } } }
private void FixedUpdate() { if (_healther.Base.IsStunned) { return; } _mover.OnUpdate(); _attacker.Base.OnUpdate(); if (!IsRetreating && _detector.IsPlayerDetected && _detector.DistToPlayer <= _retreatDistance) { IsRetreating = true; Buffer.SetBuff(_targetBuffs, BuffId.ShooterRetreat, true); } else if (IsRetreating && _detector.DistToPlayer > _retreatDistance) { IsRetreating = false; Buffer.SetBuff(_targetBuffs, BuffId.ShooterRetreat, false); } if (_attacker.Base.State == EState.Ready && _attacker.IsPossible) { _attacker.Base.Begin(); if (!IsRetreating) { _mover.ForceStop(); } } if (_mover.State == EState.Ready) { if (IsRetreating) { _mover.Begin(Stuff.PathUtil.GetNextPosToOpposite(transform.position, _detector.PlayerPos)); } else if (_attacker.Base.State == EState.Ready) { if (_detector.IsPlayerDetected) { _mover.Begin(Stuff.PathUtil.GetNextPosToTarget(transform.position, _detector.PlayerPos)); } else { _mover.Begin(Stuff.PathUtil.GetNextPosToRandom(transform.position)); } } } }
private void FixedUpdate() { if (_healther.Base.IsStunned) { return; } _attacker.Base.OnUpdate(); _mover.OnUpdate(); if (_attacker.Base.State == EState.Ready && _attacker.IsPossible) { _attacker.Base.Begin(); _mover.ForceStop(); } if (_mover.State == EState.Ready) { if (!_detector.IsPlayerDetected) { _mover.Begin(Stuff.PathUtil.GetNextPosToRandom(transform.position)); } else if (_attacker.Base.State == EState.Ready) { _mover.Begin(Stuff.PathUtil.GetNextPosToTarget(transform.position, _detector.PlayerPos)); if (IsReatreating) { IsReatreating = false; _mover.MoveSpeed /= _retreatMoveSpeedK; } } else if (_attacker.Base.State == EState.Reloading && _detector.DistToPlayer <= _retreatDistance) { _mover.Begin(Stuff.PathUtil.GetNextPosToOpposite(transform.position, _detector.PlayerPos)); if (!IsReatreating) { IsReatreating = true; _mover.MoveSpeed *= _retreatMoveSpeedK; } } } }