Class cocos.actions.interval_actions.Lerp

             object --+        
                      |        
    base_actions.Action --+    
                          |    
base_actions.IntervalAction --+
                              |
                             Lerp
Interpolate between values for some specified attribute

Methods

  init(self, attrib, start, end, duration)
Init method.
  update(self, t)
Gets called on every frame.
  __reversed__(self)
Inherited from base_actions.IntervalAction: done Inherited from base_actions.Action: __add__, __init__, __mul__, __or__, start, step, stop Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Instance Variables

Inherited from base_actions.Action: target

Method Details

init

init(self, attrib, start, end, duration)
Init method.
Parameters:
attrib : string
The name of the attrbiute where the value is stored
start : float
The start value
end : float
The end value
duration : float
Duration time in seconds
Overrides:
base_actions.Action.init

update

update(self, t)
Gets called on every frame. t is in [0,1] If this action takes 5 seconds to execute, t will be equal to 0 at 0 seconds. t will be 0.5 at 2.5 seconds and t will be 1 at 5sec.
Overrides:
base_actions.IntervalAction.update

__reversed__

__reversed__(self)
Overrides:
base_actions.Action.__reversed__