ENTRY | DOWNLOAD | MANUAL | ONGOING | |
moveBy()Moves an element by x, y, z relative to its current position. Optionally this method also takes a Tween or Thrust object. Tweens and Thrusts are carried out over the duration of multiple frames. Tweens stop at a predefined end value after a predefined time. Thrusts are carried out until canceled. >> The class reference elaborates on Tweens and Thrusts.
<camera>.moveBy(x, y, z)
<sprite>.moveBy(x, y, z) <tag>.moveBy(x, y, z) <tag>.moveBy(x, y)
<camera>.moveBy(tweenobj)
<sprite>.moveBy(tweenobj) <tag>.moveBy(tweenobj)
<camera>.moveBy(thrustobj)
<sprite>.moveBy(thrustobj) <tag>.moveBy(thrustobj)
Relevant examples: tag.py , sprite.py , tag_all.py , sprite_all.py , ALL In ContextImmediatedef onSetup(self): self.camera.moveBy(0.0, 0.0, -5.0) s = ASpriteClass(self, 'sprite1') s.moveBy(-0.5, 0.0, -1.5) t = ATagClass(self, 'tag1') t.moveBy(200, 50) Thrustsdef onSetup(self): self.camera.moveBy(Thrust(0.0, 0.0, 0.1)) s = ASpriteClass(self, 'sprite1') s.moveBy(Thrust(0.5, 0.0, 0.0)) t = ATagClass(self, 'tag1') t.moveBy(FadeinThrust(40, 80, 0)) Tweenss = ASpriteClass(self, 'sprite1') s.moveBy(Tween(2.5, 0.0, 0.0, 2.0)) t = ATagClass(self, 'tag1') t.moveBy(SineTween(50, 10, 0, 2.0)) |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |