Well yeah, because the booleans get overwritten in every iteration so only the last one will matter. You can fix this by initializing the bools to false and dropping the else parts in the loop.
Just to explain this further (if I am correct) to @James_Maslaki checking a boolean flag is nothing in performance costs, whereas a collision checking function may be a bit more costly and there is no point running it 4 times.
Putting the bool check first; if it returns false then it won’t bother checking the collision part. At least that is how I believe && works in C# .NET.
Jep, that’s true for most languages. VB is an exception though, its And operator checks both conditions, but it has an AndAlso operator that behaves like you would expect. I wonder why it’s done like that…