MoveToEvent¶
MoveTo event for a Shape
or SpriteActor
.
Constructor
MoveToEvent (obj, x, y[, speed, nextAction]) |
MoveTo event for a Shape or SpriteActor . |
Details
-
class
MoveToEvent
(obj, x, y, speed=1, nextAction=None)[source]¶ Bases:
object
Constructs a MoveEvent.
Parameters: - ojb – The object to move.
- x – The horizontal coordinate of the target position.
- y – The vertical coordinate of the target position.
- speed – The speed with which to move.
- nextAction – A function called after the move is completed.