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

2012/10/11

Removing an object that is a certain size?

1
2
SPower SPower

2012/10/11

#
// create instance variable:
int quarterSize;

// when you first access image;
quarterSize = image.getWidth() /4;

 // real code
if (image.getWidth() < quarterSize) {
      // code
}
You need to login to post a reply.
1
2