Approach (of Motion)¶
-
class
Approach¶ Defined in Approach.sc.
A motion class that causes the
Actorto move approach a target until within a certain distance, and then stop. This Motion class ignores the room obstacles. In SCI1.1, if path-finding is required, one would generally use thePolyPathclass instead.
Properties¶
Inherited from Motion:
| Property | Description |
|---|---|
| client | The Actor to which this is attached. |
| caller | The object that will get cue()’d when the motion is complete. |
| x | |
| y | |
| dx | |
| dy | |
| b-moveCnt | |
| b-i1 | |
| b-i2 | |
| b-di | |
| b-xAxis | |
| b-incr | |
| completed | |
| xLast | |
| yLast | |
| name |
Defined in Approach:
| Property | Description |
|---|---|
| who | |
| distance |
Methods¶
-
init(theClient theWho theDistance) Initializes the Approach instance.
Parameters: - theClient (heapPtr) – The
Actorto which this is attached. - theWho (heapPtr) – The target object.
- theDistance (number) – How close the Actor needs to get to theWho before stopping.
- theClient (heapPtr) – The
-
doit()
-
setTarget(param1)
-
onTarget()
