Urgs ...
Do not use distance checks unless you do distance square tests!
using SQRT will cost you an "extreme" amount of time, that is not really be needed in a 2D game (you can't make worlds large enough as screens can't have that high resolutions ;-) )
Do not use distance checks unless you do distance square tests!
using SQRT will cost you an "extreme" amount of time, that is not really be needed in a 2D game (you can't make worlds large enough as screens can't have that high resolutions ;-) )