Ejemplo n.º 1
0
    private void ShootWallShooters()
    {
        AdjustWallShooterPos(leftWallShooter);
        AdjustWallShooterPos(rightWallShooter);

        leftWallShooter.Shoot();
        rightWallShooter.Shoot();
    }
Ejemplo n.º 2
0
    private void UpdateReturningArrowSpell(float deltaTime)
    {
        timer += deltaTime;

        if (timer >= returningArrowFireRate)
        {
            ReturnExisitingReturningArrows();
            returningArrowShooter.Shoot();
            timer = 0f;
        }
    }
Ejemplo n.º 3
0
    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);
    }
Ejemplo n.º 4
0
    private void ShootParanoiaShooter()
    {
        AdjustParanoiaShooterPos();

        paranoiaShooter.Shoot();
    }
Ejemplo n.º 5
0
 private void FireArrowRain()
 {
     arrowRainShooter.Shoot();
 }