示例#1
0
    private void FireProjectile()
    {
        float angle = transform.eulerAngles.z + Random.Range(-maxSpreadAngle, maxSpreadAngle);

        ProjectileScript proj = m_projectilePool[m_currProjectile];

        proj.transform.position = fireFromPoint.position;
        proj.FireProj(angle);
        m_currProjectile = (m_currProjectile + 1) % m_numProjectiles;

        m_soundSystem.PlayOneShot(fireSoundName);
    }