void ErrorCheck(BattlerCollider check) { if (check.x1 > check.x2) { Debug.LogError("BattlerCollider has negative boundries: x1 > x2!"); } if (check.y1 > check.y2) { Debug.LogError("BattlerCollider has negative boundries: y1 > y2!"); } }
void ErrorCheck(BattlerCollider check) { if (check.x1 > check.x2) { Debug.LogError("BattlerCollider has negative boundries: x1 > x2!"); } if (check.y1 > check.y2) { Debug.LogError("BattlerCollider has negative boundries: y1 > y2!"); } }
public bool HitTest(BattlerCollider other) { //ErrorCheck(this); //ErrorCheck(other); return((x1 <= other.x2 && x2 >= other.x1) && (y1 <= other.y2 && y2 >= other.y1) && z == other.z); }
public bool HitTest(BattlerCollider other) { //ErrorCheck(this); //ErrorCheck(other); return (x1 <= other.x2 && x2 >= other.x1) && (y1 <= other.y2 && y2 >= other.y1) && z == other.z; }