add spawn point, death
This commit is contained in:
@@ -11,15 +11,10 @@ public class Hammer : MonoBehaviour
|
||||
private void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
var mapElement = collision.collider.GetComponent<MapElement>();
|
||||
if(mapElement!=null)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
if (mapElement?.ElementSO.ElementType==MapElementType.BreakableWall)
|
||||
if (mapElement != null)
|
||||
{
|
||||
mapElement.Hit();
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user