DPath (of Motion)¶
-
class
DPath¶ Defined in DPath.sc.
DPath (or “dynamic path”) uses a list of locations to direct the
Actortowards its destination.Example usage:
; Send the hoverGuys along 3 points to the destination, then cue() the caller. (hoverGuys setMotion: DPath 255 137 154 138 140 137 self)
Subclasses: RelDPath.
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 DPath:
| Property | Description |
|---|---|
| points | |
| value |
Methods¶
-
init(theClient [points... theCaller]) Parameters: - theClient (heapPtr) – The Actor to which this is attached.
- points (number) – Pairs of (x, y) coordinates.
- theCaller (heapPtr) – Object that will have its cue() method called when the Actor reaches the target.
-
dispose()
-
moveDone()
-
setTarget()
