lundi 6 novembre 2017

Comparing two ranges of numbers in an if statement?

I am trying to figure out a way to compare two ranges of numbers in an if statement. The method I am working on returns a boolean to see if two sprites overlap, and I am currently thinking of implementing it by comparing their locations. The sprites are 60X60, and their x and y locations reference their top left corners.

Am I going about this the wrong way? If not, whats the best way to compare these ranges via if statements?

Aucun commentaire:

Enregistrer un commentaire