/// <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; } }
public void BeginSatelliteScan() { SniperFury sf = (SniperFury)sniper; sf.OnSatelliteScan(); }