Lode Runner: Walk Over a Hole with Enemy

Hello World,

I am basically making a remake of Lode Runner and I am having a hard time to do the mechanics for the hole digged.

The game is a 2D platform (thus using sprite and BoxCollider2D). I am not using any rigidbody here. Each cell of the game can be either {Empty | Ground| Ladder | Coin | Exit | Bar to hang}. The question is about the Ground. Each ground is surrounded by a BoxCollider2D with a LayerMask. If I dig a hole then obviously the sprite and the boxcollider disappear for x amount of times. So far no problem. The problem is implementing when an enemy falls to the hole and so it simulates as if there is a ground so I can walk on top of him. I tried couple of things but with no success. The solution has to be with precise and quick. For example, there is 1 hole and 2 enemies that are very close to each other so if one fall to the hole, the other should walk over him even if the fallen enemy haven got to the bottom of the hole yet.

Anyone has a suggestion how to approach. I looked online but I did not find any good answer for that.

The way i would do it is have another block with the same properties as “Ground” and if the enemy falls into the ditch then delete him and make that “block” so other enemies think that he is a block not a ditch… you would need a collider trigger in that hole to check if someone fell in. I hope that helps