This site requires JavaScript, please enable it in your browser!
Greenfoot back
SwaggyXiao
SwaggyXiao wrote ...

2021/1/29

getIntersectingObjects() Question

SwaggyXiao SwaggyXiao

2021/1/29

#
Hi, I have a question like this I use getIntersectingObjects(Objects.class) to put all Objects into a List. How does the order of the list work? Like if I do get(0) how does it know which is first?
danpost danpost

2021/1/29

#
SwaggyXiao wrote...
Hi, I have a question like this I use getIntersectingObjects(Objects.class) to put all Objects into a List. How does the order of the list work? Like if I do get(0) how does it know which is first?
It is probable that they will appear in the list in the same order as they were added into the world.
SwaggyXiao SwaggyXiao

2021/1/29

#
danpost wrote...
SwaggyXiao wrote...
Hi, I have a question like this I use getIntersectingObjects(Objects.class) to put all Objects into a List. How does the order of the list work? Like if I do get(0) how does it know which is first?
It is probable that they will appear in the list in the same order as they were added into the world.
OHHH I will try it! THANK YOU!
You need to login to post a reply.