Пример #1
0
    private void Attack()
    {
        m_projectileHandler.fireRateDelayRemaining -= Time.deltaTime;

        if (m_projectileHandler.fireRateDelayRemaining <= 0f)
        {
            m_projectileHandler.CreateProjectile(transform.position, m_player.position);
            m_projectileHandler.fireRateDelayRemaining = m_projectileHandler.GetFireRate();
        }
    }
Пример #2
0
    private void AerialAttack()
    {
        m_projectileHandler.fireRateDelayRemaining -= Time.deltaTime;

        // Is the enemy ready to fire?
        if (m_projectileHandler.fireRateDelayRemaining <= 0f)
        {
            m_projectileHandler.CreateProjectile(transform.position, m_player.position);
            m_projectileHandler.fireRateDelayRemaining = m_projectileHandler.GetFireRate();  // Reset delay
        }
    }