Class cocos.actions.interval_actions.JumpTo

             object --+            
                      |            
    base_actions.Action --+        
                          |        
base_actions.IntervalAction --+    
                              |    
                         JumpBy --+
                                  |
                                 JumpTo

Moves a CocosNode object to a position simulating a jump movement by modifying it's position attribute.

Example:

action = JumpTo(50,200, 5, 6)  # Move the sprite 200 pixels to the right
sprite.do( action )            # in 6 seconds, doing 5 jumps
                               # of 50 pixels of height

Methods

  start(self)
Before we start executing an action, self.target is assigned and this method is called.
  __reversed__(self) (Inherited from cocos.actions.interval_actions.JumpBy)
  init(self, position=(0,0), height=100, jumps=1, duration=5)
Init method
(Inherited from cocos.actions.interval_actions.JumpBy)
  update(self, t)
Gets called on every frame.
(Inherited from cocos.actions.interval_actions.JumpBy)
Inherited from base_actions.IntervalAction: done Inherited from base_actions.Action: __add__, __init__, __mul__, __or__, 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

start

start(self)
Before we start executing an action, self.target is assigned and this method is called. It will be called for every execution of the action.
Overrides:
JumpBy.start