Exemple #1
0
    IEnumerator CheckFire()
    {
        bool isFiring = m_isAutomatic ? MyInput.GetFire0() : MyInput.GetFire0Down();

        if (isFiring)
        {
            Fire(m_forward.forward);
        }

        float delay = isFiring ? m_cooldown : 0;

        yield return(new WaitForSeconds(delay));

        StartCoroutine(CheckFire());
    }