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

2011/4/27

Passing on a trait to other objects of the same class

mahimahi42 mahimahi42

2011/4/27

#
Hi all, I'm trying to simulate a simple disease for a science project, however, I've run into a big problem. I've set up the disease so that when an object of the Organism class touches it, it turns green and is 'infected'. I'm trying to code this so that when an 'infected' object touches one that's 'uninfected', it in turn 'infects' the new object. However, using getOneIntersectingObject() is not working for some reason. Any ideas?
mahimahi42 mahimahi42

2011/4/27

#
Nevermind! I found my problem, and have since fixed it.
You need to login to post a reply.