void AddForce(BulletImpact _impact) { if (hover_script.GetAlive()) { hover_script.SetAlive(false); on_death.Invoke(); } _impact.body.AddForce(_impact.dir * bullet_hit_force, ForceMode2D.Impulse); }
public void BreakShot(BulletImpact _impact) { Instantiate(force_explosion, _impact.pos, force_explosion.transform.rotation); bool unscaled_sound = _impact.body != null; if (unscaled_sound) { AudioManager.PlayOneShotUnscaled(break_clip); } Break(!unscaled_sound); }
public void HitLimb(BulletImpact _impact) { AddForce(_impact); SpawnSplat(_impact.body.transform.position); }
public void Hit(BulletImpact _impact) { hit_events.Invoke(_impact); }
public void Scuff(BulletImpact _impact) { scuff_events.Invoke(_impact); }