예제 #1
0
    public float Resistance(Vector3Int cellPos, bool includeObjects = true)
    {
        float resistance = 0;

        foreach (var damageableLayer in DamageableLayers)
        {
            resistance += damageableLayer.TilemapDamage.Integrity(cellPos);
        }

        if (includeObjects && ObjectLayer)
        {
            resistance += ObjectLayer.GetObjectResistanceAt(cellPos, true);
        }
        return(resistance);
    }