Added loss condition and make player lose energy for colliding with an enemy.