Added gravity attribute to player to fix platforming collision. Very messy, to be refactored later.