| Trees | Indices | Toggle frames |
|---|
object --+
|
cocosnode.CocosNode --+
|
BatchNode
| __init__(self) | |
|
add(self,
child,
z=0,
name=None)
Adds a child to the container
|
|
|
visit(self)
This function visits it's children in a recursive
way.
|
|
|
draw(self)
This is the function you will have to override if you want your
subclassed to draw something on screen.
|
|
Inherited from cocosnode.CocosNode:
__contains__,
are_actions_running,
do,
get,
get_ancestor,
get_children,
on_enter,
on_exit,
pause,
pause_scheduler,
remove,
remove_action,
resume,
resume_scheduler,
schedule,
schedule_interval,
stop,
transform,
unschedule,
walk
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
Inherited from object:
__class__
|
Inherited from cocosnode.CocosNode:
actions,
camera,
children,
children_anchor_x,
children_anchor_y,
children_names,
grid,
is_running,
rotation,
scale,
scheduled_calls,
scheduled_interval_calls,
skip_frame,
to_remove,
transform_anchor_x,
transform_anchor_y,
visible,
x,
y
|
Inherited from cocosnode.CocosNode:
anchor,
anchor_x,
anchor_y,
children_anchor,
parent,
position,
transform_anchor
|
This function visits it's children in a recursive way.
It will first visit the children that that have a z-order value less than 0.
Then it will call the draw method to draw itself.
And finally it will visit the rest of the children (the ones with a z-value bigger or equal than 0)
Before visiting any children it will call the transform method to apply any possible transformation.
This is the function you will have to override if you want your subclassed to draw something on screen.
You must respect the position, scale, rotation and anchor attributes. If you want OpenGL to do the scaling for you, you can:
def draw(self): glPushMatrix() self.transform() # ... draw .. glPopMatrix()
| Trees | Indices | Toggle frames |
|---|
| Generated by Epydoc 3.0beta1 on Sat Sep 6 13:21:11 2008 | http://epydoc.sourceforge.net |