The Follow class is a motion class which
allows actors to follow other actors.
Properties
- client
- caller
- x
- y
- dx
- dy
- b-moveCnt
- b-i1
- b-i2
- b-di
- b-xAxis
- b-incr
- completed
- xLast
- yLast
- who
- distance
Methods
-
void
init([heapPtr theClient, heapPtr theWho, number theDistance]) |
Sets up the Follow class. If specified,
it assigns the parameters to their corresponding properties.
|
-
void
doit() |
Moves the client actor towards
the who actor.
|
-
void
moveDone() |
Just an empty place holder method
in Follow.
|
-
void
setTarget([number newX, number newY]) |
If specified, it sets the x and
y properties to newX and newY. Otherwise, it sets the x and
y properties to the who's coordinates.
|
-
bool onTarget()
|
Returns TRUE if distance to the
who is less than or equal to the distance property. Otherwise,
it returns FALSE.
|
|