I'm designing a simple game where you're to avoid being hit by the AI i've created.
I've been looking up Collision detection and I have a question.
All the info i've looked up seem to involve using quite a bit of code.
I was wondering why can't a simple:
if(AI.xDirection == x || AI.yDirection == x || AI.xDirection == y || AI.yDirection == y){
System.out.println("Collision");
Be used for this?
As you see I have it set to print to console and it seems to be working for me.
Is there a disadvantage to this?