public void checkCollisions(GameObject p) {
        if(!alive) {
            onPlatform = false;
            return;
        }
        
        if (y+height < p.y) return;
	if (y > p.y+p.height) return;
	if (x+width/2 < p.x) return;
	if (x > p.x+p.width/2) return;
        
        if(p instanceof Platform) {
            if(y < p.y) {
                onPlatform = true;
                y = p.y - height;
                if(vy > 0) {
                    vy = 0;
                }
            }
            else {
                y = p.y + p.height + 1;
           }
        }
    }