Exemple #1
0
    private IEnumerator FireSequence()
    {
        yield return(MoveToPosition(startPosition, startSpeed));//Gets into position

        yield return(new WaitForSeconds(1));

        audioManager.Play("Boss3_Indicate", 0.75f, 1.5f);
        yield return(laserManager.IndicateLaser(1, Quaternion.Euler(0, 0, -90)));//Indicates Attack

        audioManager.Play("Boss3_Laser", 0.75f, 1.5f);
        StartCoroutine(laserManager.ShootLaser(Quaternion.Euler(0, 0, -90)));//Shoots and starts to move
        yield return(MoveToPosition(targetPosition, speedDivision));

        Destroy(this.gameObject);
    }
Exemple #2
0
    //Action 1 - Shoot Player
    public IEnumerator ShootPlayer()
    {
        lookAtTarget.isAiming = false;
        Quaternion angle = lookAtTarget.aimAngle;

        //Indicate
        audioManager.Play("Boss3_Indicate");
        animator.SetTrigger(BossAnimation.AttackStandard);
        yield return(laserManager.IndicateLaser(indicateTime, angle));

        //Fire
        audioManager.Play("Boss3_Laser");
        animator.SetTrigger(BossAnimation.Fire);
        yield return(laserManager.ShootLaser(lookAtTarget.aimAngle, stLaser.GetLaser()));

        DefaultState();
    }