The link to the game and his code may be found here:
http://www.learningprocessing.com/examples/chapter-10/example-10-10/
What I'm trying to do sounds simple. I'm trying to have a rectangle appear on screen with its length decreasing when a raindrop is missed. Under Shiffman's "Drops" tab, he has a boolean statement "boolean reachedBottom() {". If I want to check if this is true, what do I do? I tried:
Code:
if (reachBottom()) {
(rectlength=rectlength-1);
}
to no avail. I don't understand how this boolean is set up. Why is it set up as a function?
I figured there was a different way to accomplish this same task, so I tried:
Code:
if (y > height + r*4) {
(rectlength=rectlength-1);
}
and placed it under the "Drops" tab. Yet again, to no avail.
The next thing I'm attempting to do is have the raindrops become faster after 80 raindrops have fallen. Will this involve an edit to the array itself? I'm very lost on that one.
There are a few other things I'm trying to do with the program yet I think I can manage it on my own once I understand how the two tasks I mentioned can be accomplished.
Thank you very much for any help you can give me. It's ok if you guys don't want to write out the actual code, but some helpful advice on what I'm doing wrong and how to accomplish what I want would be nice.