private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag != GameTags.Loot) { this.SpaceShip.OnCollisiion(DamageCalc.PowerFunc(DamageCalc.GetDamageForce(collision))); } }
public void OnCollisionEnter2D(Collision2D collision) { // missle hits does not count if (collision.gameObject.GetComponent <MissleBehaviour>() == null) { this.Damage(DamageCalc.PowerFunc(DamageCalc.GetDamageForce(collision), this.scaleDamageSensivity)); } }