Esempio n. 1
0
 public void Attack3()
 {
     if (isDead)
     {
         return;
     }
     coneCastCount -= 1;
     expulseConeAbility.Cast();
     _audioManager.PlayOneShot("smash", 0.4f);
 }
Esempio n. 2
0
 public void AttackJump()
 {
     if (isDead)
     {
         return;
     }
     circleCastCount -= 1;
     expulseCircleAbility.Cast();
     _audioManager.PlayOneShot("pound", 0.4f);
     if (circleCastCount == 0)
     {
         SetDizzy();
     }
 }
Esempio n. 3
0
    void CastLaserEyes()
    {
        if (isDead)
        {
            return;
        }
        var eyesAbility = ((AlternatingProjectileAbility)laserEyes.ability);

        eyesAbility.leftEye  = leftEye;
        eyesAbility.rightEye = rightEye;
        eyesAbility.target   = _target;
        laserEyes.Cast();
        _audioManager.PlayOneShot("laser", 0.2f);
    }
Esempio n. 4
0
    // Update is called once per frame
    void Update()
    {
        if (_player is null)
        {
            return;
        }
        FollowPlayer();
        if (PlayerInLos())
        {
            FaceTarget();
        }

        if (PlayerInFront())
        {
            var cast = _ability.Cast();
            if (cast && !_animator.GetBool(IsAttacking))
            {
                _animator.SetBool(IsAttacking, true);
                _audioManager.PlayOneShot("minion_cast", 0.4f);
            }
        }
    }