Class: Wander (of Obj)

The Wander class is a movement class which allows actors to wander around aimlessly.

Properties

  • client
  • caller
  • x
  • y
  • dx
  • dy
  • b-moveCnt
  • b-i1
  • b-i2
  • b-di
  • b-xAxis
  • b-incr
  • completed
  • xLast
  • yLast
  • distance

Methods

  • void init([heapPtr theClient, number theDistance])

    Sets up the Wander class.

    If specified, it assigns the parameters to their corresponding properties. It sets up it's target to a random point and calls it's super's init() method.

  • void doit()

    Moves the client actor towards it's random target.

  • void moveDone()

    Occurs when the actor has reached it's target. It simply sets up a new random target.

  • void setTarget()

    Sets up a random target for the actor.

  • bool onTarget()

    It returns FALSE since there will never actually be a real target.