How to add death animation?

Hello, I am making a 2d platformer, and have just added pathfinding to my enemy. Is there an easy way to play a quick death animation and then level restart when I touch the enemy? Thanks.

Watch this:

It could help