hitx method

bool hitx(
  1. Moving d
)

collision with horizontal movement

Implementation

bool hitx(Moving d) {
  return hit(d) && (d.xdelta > 0 && xdelta < 0 || xdelta > 0 && d.xdelta < 0);
//    return false;
}