Ejemplo n.º 1
0
    // Fire a projectile
    private void Fire()
    {
        // Count for analytics
        if (fireTarget && fireTarget.GetComponentInParent <Virus>() && IsHeavyWeaponSelected())
        {
            antibioticUseOnVirus++;
        }

        // Spawn the projectile
        SpawnProjectile();

        // Apply a drawback force
        ApplyFireDrawback(heavyWeaponSelected? fireDrawbackP2 : fireDrawbackP1);

        // Increase mutation proba if heavy projectile is fired
        if (heavyWeaponSelected)
        {
            if (fireTarget && fireTarget.GetOrgMutation())
            {
                fireTarget.GetOrgMutation().ShineShields();
            }
            gameController.IncreaseAllMutationProba();
            if (audioManager)
            {
                audioManager.Play("FireHeavy");
            }
        }
        else
        {
            if (audioManager)
            {
                audioManager.Play("FireLight");
            }
        }
    }