Moving Object

Syntax

class CreateMovingObject(obj, handler, maxDistance[, speed=10][, direction=GameDirection.Bottom])
obj
The object which should move (that object need the Check() - Event!)
handler
The global Handler Object
maxDistance
The maximum distance
speed
The speed
direction
The direction the object should start moving

Import

from MovingObject import CreateMovingObject

Example

assuming your Enemy’s Name is ‘Spika1‘ and you want to move it 200px, start right:

CreateMovingObject(Spika1, handler, 200, direction=GameDirection.Right)