Class lime.animation.MoveBy
Extends
lime.animation.Animation.
Defined in: moveby.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
lime.animation.MoveBy(delta, opt_y)
Move elemenet by offset
Also accepts two numbers (x and y)
|
| Field Attributes | Field Name and Description |
|---|---|
- Fields borrowed from class lime.animation.Animation:
- isPlaying_, targets
| Method Attributes | Method Name and Description |
|---|---|
| <private> |
Calculate animations duration based on its speed.
|
|
clearTransition(target)
Clear previously set transition values.
|
|
|
makeTargetProp(target)
|
|
|
reverse()
|
|
|
setSpeed(speed)
Helper function that sets tha animation duration
based on the size of the delta.
|
|
|
update(t, target)
|
- Methods borrowed from class lime.animation.Animation:
- addTarget, cloneParam, enableOptimizations, getDirector, getDuration, getEasing, getTargetProp, initTarget, play, removeTarget, setDuration, setEasing, step_, stop, updateAll, useTransitions
Class Detail
lime.animation.MoveBy(delta, opt_y)
Move elemenet by offset
Also accepts two numbers (x and y)
var moveleft = new lime.animation.MoveBy(100,0); sprite.runAction(moveleft);
- Parameters:
- {(goog.math.Coordinate|number)} delta
- Offset to move.
- {number=} opt_y
- Optionaly use x,y
Field Detail
scope
Method Detail
<private>
calcDurationFromSpeed_()
Calculate animations duration based on its speed.
clearTransition(target)
Clear previously set transition values.
- Parameters:
- {lime.Node} target
- Target node.
makeTargetProp(target)
- Parameters:
- target
reverse()
{lime.animation.MoveBy}
setSpeed(speed)
Helper function that sets tha animation duration
based on the size of the delta. 1 unit means 100px/sec.
- Parameters:
- {number} speed
- Speed value.
- Returns:
- {lime.animation.MoveBy} Object itself.
update(t, target)
- Parameters:
- t
- target