Commit 03809be5 authored by Sebastian's avatar Sebastian

fire destroys on contact with everything but ground; damges water enemy

parent 1e4de605
......@@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 100393043881132461}
- component: {fileID: 100393043881132460}
- component: {fileID: 100393043881132459}
- component: {fileID: 5191162397220846548}
m_Layer: 4
m_Name: Water
m_TagString: Untagged
......@@ -140,3 +141,29 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_CharacterLayer: 10
--- !u!61 &5191162397220846548
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 100393043881132458}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
......@@ -29,8 +29,20 @@ namespace _Game.Scripts.Player.PlayerAttacks.Fire
collision.gameObject.GetComponent<Life>().Damage(1);
Destroy();
}
else
{
Destroy();
}
}
else if (collision.gameObject.CompareTag("DestroyableByFire"))
else if (!(collision.gameObject.layer == LayerMask.NameToLayer("Ground")))
{
Destroy();
}
}
private void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.layer == LayerMask.NameToLayer("Water"))
{
Destroy();
}
......
fileFormatVersion: 2
guid: 9b3708a150515924597eab237f7f37fb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment