Exemple #1
0
    /// <summary>
    /// Call when the bullet hits this enemy
    /// </summary>
    public void OnBulletHit(float damage)
    {
        if (!Alive)
        {
            return;
        }

        //Damage the enemy
        Health -= damage;

        if (Health > 0)
        {
            StartCoroutine(Hurt());
            //Don't continue unless enemy is dead
            return;
        }

        //If I just got hit, and bullet cam is active, it must be time to turn it off
        if (sniper.InBulletCam)
        {
            sniper.OnBulletCamEnd(this);
        }
        else
        {
            if (sniper is SniperFury)
            {
                SniperFury sf = (SniperFury)sniper;
                if (sf.canShootAdditionalBullet)
                {
                    return;
                }
            }
            Alive = false;
        }
    }
Exemple #2
0
    public void BeginSatelliteScan()
    {
        SniperFury sf = (SniperFury)sniper;

        sf.OnSatelliteScan();
    }