Solarus quests
1.6
Quest maker's reference
|
A pixel movement makes a succession of basic translations, where each translation is a pixel-precise specified move (for example (+2,-1)
). Each translation is immediate.
Unlike most other types of movements, there is no notion of speed in pixels per seconds. That's because a translation can transport the object instantly to another place - the movement is not necessarily continuous. Instead, you can set the delay between each translation.
Pixel movements are particular movement objects. Therefore, they inherit all methods from the type movement.
See Methods of all movement types to know these methods.
The following methods are specific to pixel movements.
Returns the trajectory of this movement.
Sets the trajectory of this movement.
Any previous trajectory is removed and the movement starts at the beginning of the new trajectory.
Returns whether this movement restarts automatically when the trajectory is finished.
true
if the movement loops.Sets whether this movement should restart automatically when the trajectory is finished.
loop
(boolean, optional): true
to make the movement loop. No value means true
.Returns the delay between two steps of the trajectory.
Sets the delay between two steps of the trajectory.
delay
(number): The delay between two steps in milliseconds.Pixel movements are particular movement objects. Therefore, they inherit all events from the type movement.
See Events of all movement types to know these events.