parametersChallenge's Code

Created by: SHR



When the world starts
Do: first method

When is clicked on anything
Do: ( object under mouse cursor )

Methods first method ( )
    No variables
       bunny say I'm hungry!! Let's eat!


Methods ( [Obj] thing)
    No variables
       // Right now the bunny will only visit the carrot and eat it no matter what is clicked on
  // Edit this method so any of bunny's treats can be clicked on and he can eat them!
  // WARNING: Bunny only likes healthy treats! He should not eat any cookies!
  // Add an EVENT to run the event when a treat is clicked on!
  bunny turn to face thing
  bunny move ( ( ( bunny distance to thing ) - 1 ) ) toward target = world
  If ( thing == cookie )
       bunny say That's no good!
    If ( cookie2 == thing )
       bunny say That's no good!
    If ( cookie3 == thing )
       bunny say That's no good!
    If ( ground == thing )
       bunny say That's no good!
    bunny turn forward .18 revolutions
  thing set isShowing to false duration = 0 seconds
  bunny turn backward 0.18 revolutions