kangarooVisitFriends's Code

Created by: Susan Rodger

world

Events

When the world starts
Do:
world.my first method


When is clicked on anything
Do:
kangaroo.visit ( object under mouse cursor ) greeting = How are you doing?


When the world starts
Do:
kangaroo say Click on any animal and I'll visit them duration = 2 seconds


Methods

  world.my first method ( )
    No variables
       // Note that I disabled the event that calls this method so I could play the world interactively.
  kangaroo.visit friendToVisit = bunny greeting = Hi
  kangaroo.visit friendToVisit = cow greeting = hello
  kangaroo.visit friendToVisit = horse greeting = How are you doing?
  kangaroo.visit friendToVisit = tortoise greeting = What's up?
  kangaroo.visit friendToVisit = ladybug greeting = Wow how are you
  kangaroo.visit friendToVisit = turtle greeting = hello hello hello


kangaroo

Methods

  kangaroo.visit ( [Obj] friendToVisit, [ABC] greeting)
    No variables
       Do together
       kangaroo turn to face friendToVisit
  friendToVisit turn to face kangaroo
  kangaroo move forward ( ( ( kangaroo distance to friendToVisit ) - 2 ) )
  kangaroo say greeting
  If ( ( subject = friendToVisit 's height ) < 1 )
       // Jump over
  kangaroo move up 1 meter
  kangaroo move forward ( ( ( subject = friendToVisit 's depth ) + 4 ) )
  kangaroo move down 1 meter
  Else
    kangaroo turn right 0.25 revolutions
  kangaroo turn left 0.5 revolutions asSeenBy = friendToVisit