コード例 #1
0
    internal void ImpactDamage(float size, float collisonSpeed, ContactPoint2D[] contacts)
    {
        float severity = size * collisonSpeed * damageFactor;

        if (severity > 50)
        {
            Damage(severity / 10);
            DamageSubsystem();
        }
        else
        {
            Damage(severity / 10);
        }

        damageSystem.SpawnVisualDamage(health, contacts);
    }