Check layer function modified so you can pass as a parameter wich layer you want to check, added collectables collect