public override void FrameAction() { if (CurrentRingCooldown > 0) { CurrentRingCooldown -= Time.deltaTime; } else { Vector2 gapDirection = _lastGapDirection.TurnedAroundOrigin(Random.Range(MIN_GAP_ROTATION, MAX_GAP_ROTATION)); _bulletRingLauncher.LaunchRing(gapDirection); CurrentRingCooldown = RING_COOLDOWN; _lastGapDirection = gapDirection; } }
public override void FrameAction() { if (_currentRingCooldown > 0) { _currentRingCooldown -= Time.deltaTime; } else { Vector2 directionToPlayer = _player.transform.position - _monoBehaviour.transform.position; Vector2 gapDirection = directionToPlayer.TurnedAroundOrigin(Random.Range(-MAX_GAP_ROTATION, MAX_GAP_ROTATION)); _bulletRingLauncher.LaunchRing(gapDirection); _currentRingCooldown = RING_COOLDOWN; } }