Exemple #1
0
    private void Attack()
    {
        int randomSound = Random.Range(0, 3);

        if (!IsARoarPlaying() && !coolDownRoarDone)
        {
            roars[randomSound].volume = 0.0f;
            roars[randomSound].Play();
            coolDownRoarDone = true;
            tm.navStart();
        }
        Debug.Log("Roared" + randomSound);
        if (!IsARoarPlaying() && coolDownRoarDone)
        {
            tm.navStop();
            Debug.Log("Boum Attacking");
            roars[randomSound].volume = 0.6f;
            roars[randomSound].Play();
            m_animator.SetTrigger("Attack");
            attackParticule.Emit(30);
            sphereCollider.enabled = true;
            attacking = false;
            Invoke("SphereColliderDisable", 0.5f);
            coolDownRoarDone = false;
        }
    }
Exemple #2
0
 public void TriggerDeath()
 {
     ta.navStop();
     m_animator.SetTrigger("Death");
 }