private void ShootWallShooters() { AdjustWallShooterPos(leftWallShooter); AdjustWallShooterPos(rightWallShooter); leftWallShooter.Shoot(); rightWallShooter.Shoot(); }
private void UpdateReturningArrowSpell(float deltaTime) { timer += deltaTime; if (timer >= returningArrowFireRate) { ReturnExisitingReturningArrows(); returningArrowShooter.Shoot(); timer = 0f; } }
private IEnumerator InvokeIllusionaryScare() { Time.timeScale = 0f; GameManager.Instance.SetScareFlashPanelAlphaColor(160); AudioManager.Instance.PlayAudioClipIfExists(AudioType.EnemyShoot_Flutter); // The number of bullets to change at a time before pausing. int batchesToChangeAtATime = illusionaryShooter.BulletCount; // Keep track of how many bullets we already changed. int i = 0; foreach (var activeBullet in illusionaryShooter.GetAllActiveShotBullets()) { // Move the scare shooter to the current bullet position. scareShooter.transform.position = activeBullet.transform.position; // Shoot the scare shooter. scareShooter.Shoot(); activeBullet.Dispose(); ++i; // If we already changed enough bullets. if (i == batchesToChangeAtATime) { // Give it a pause before changing the next batch. i = 0; yield return(new WaitForSecondsRealtime(0.05f)); } } float progress = 0f; while (progress < 1f) { // Progressively scale back the panel's alpha color. GameManager.Instance.SetScareFlashPanelAlphaColor((byte)Mathf.Lerp(160, 0, progress)); // Progressively scale back time. Time.timeScale = Mathf.Lerp(0, 1, progress); progress += Time.unscaledDeltaTime * 1.25f; yield return(new WaitForEndOfFrame()); } // Ensure time and panel is scaled properly at the end. Time.timeScale = 1f; GameManager.Instance.SetScareFlashPanelAlphaColor(0); yield return(null); }
private void ShootParanoiaShooter() { AdjustParanoiaShooterPos(); paranoiaShooter.Shoot(); }
private void FireArrowRain() { arrowRainShooter.Shoot(); }