If butterfly distance away from ground is more than ____, then do _____-
If butterfly is within .1 meters of ground, do _____
Be sure to loop these both infinitely, otherwise they will only check at the beginning of the world.
I had this assignment also, so if you want, you can refer to it for help. The only thing I didn't do was loop the if statements infinitely, so remember to do that
. (I think at least, but I could have missed something else)
Assignment:
http://www.dinkypage.com/113622
Oh, and also, here is what I think you need to use:
Boolean butterfly.rise ( )
No variables
If ( butterfly is within 0 meters of ground )
Return true
Else
Return false
Boolean butterfly.fall ( )
No variables
If ( butterfly is at least 1 meter away from ground )
Return true
Else
Return false
From there, you can say in your myfirstmethod that if _____ returns true, do a method that makes the butterfly go up or down.