Uses eventsystem to trigger end game.