Package pilas :: Module pytweener :: Class Tween
[hide private]
[frames] | no frames]

Class Tween

source code

object --+
         |
        Tween

Instance Methods [hide private]
 
__init__(self, obj, tduration, tweenType, completeFunction, updateFunction, delay, **kwargs)
Tween object: Can be created directly, but much more easily using Tweener.addTween( ...
source code
 
decodeArguments(self)
Internal setup procedure to create tweenables and work out how to deal with each
source code
 
pause(self, numSeconds=-1)
Pause this tween do tween.pause( 2 ) to pause for a specific time or tween.pause() which pauses indefinitely.
source code
 
resume(self)
Resume from pause
source code
 
update(self, ptime)
Update this tween with the time since the last frame if there is an update function, it is always called whether the tween is running or paused
source code
 
getTweenable(self, name)
Return the tweenable values corresponding to the name of the original tweening function or property.
source code
 
Remove(self)
Disables and removes this tween without calling the complete function
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, obj, tduration, tweenType, completeFunction, updateFunction, delay, **kwargs)
(Constructor)

source code 

Tween object: Can be created directly, but much more easily using Tweener.addTween( ... )

Overrides: object.__init__

getTweenable(self, name)

source code 

Return the tweenable values corresponding to the name of the original tweening function or property.

Allows the parameters of tweens to be changed at runtime. The parameters can even be tweened themselves!

eg:

# the rocket needs to escape!! - we're already moving, but must go faster! twn = tweener.getTweensAffectingObject( myRocket )[0] tweenable = twn.getTweenable( "thrusterPower" ) tweener.addTween( tweenable, change=1000.0, tweenTime=0.4, tweenType=tweener.IN_QUAD )