[sbfury] 4 new revisions pushed by hugoruscitti on 2010-06-10 06:01 GMT

2 views
Skip to first unread message

codesite...@google.com

unread,
Jun 10, 2010, 2:02:13 AM6/10/10
to losersjue...@googlegroups.com
4 new revisions:

Revision: 00447547ec
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Sun Jun 6 16:14:06 2010
Log: source/conf.py
http://code.google.com/p/sbfury/source/detail?r=00447547ec

Revision: f4c7eeb260
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Sun Jun 6 19:36:23 2010
Log: actualizando la documentacion del proyecto, colocando capturas de
pant...
http://code.google.com/p/sbfury/source/detail?r=f4c7eeb260

Revision: d93d484c25
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Wed Jun 9 22:52:11 2010
Log: cambiando la animacion de explosion cuando un personaje es golpeado.
http://code.google.com/p/sbfury/source/detail?r=d93d484c25

Revision: 22b58fd839
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Wed Jun 9 22:58:56 2010
Log: arreglando la posicion del efecto grafico de colision. Tambien
evitand...
http://code.google.com/p/sbfury/source/detail?r=22b58fd839

==============================================================================
Revision: 00447547ec
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Sun Jun 6 16:14:06 2010
Log: source/conf.py
http://code.google.com/p/sbfury/source/detail?r=00447547ec

Modified:
/data/scene/menu/background.png
/doc/source/conf.py
/doc/source/index.rst
/sbfury/collision.py
/sbfury/config.py
/sbfury/main.py
/sbfury/scene/game.py
/sbfury/stage.py

=======================================
--- /data/scene/menu/background.png Sat May 29 21:13:43 2010
+++ /data/scene/menu/background.png Sun Jun 6 16:14:06 2010
Binary file, no diff available.
=======================================
--- /doc/source/conf.py Sat May 29 21:37:46 2010
+++ /doc/source/conf.py Sun Jun 6 16:14:06 2010
@@ -16,7 +16,7 @@
# If extensions (or modules to document with autodoc) are in another
directory,
# add these directories to sys.path here. If the directory is relative to
the
# documentation root, use os.path.abspath to make it absolute, like shown
here.
-#sys.path.append(os.path.abspath('.'))
+sys.path.append(os.path.abspath('../../sbfury/'))

# -- General configuration
-----------------------------------------------------

=======================================
--- /doc/source/index.rst Sat May 29 21:42:23 2010
+++ /doc/source/index.rst Sun Jun 6 16:14:06 2010
@@ -13,6 +13,12 @@

escenas

+
+.. automodule:: stage
+
+.. autoclass:: Stage
+ :members:
+
Indices and tables
==================

=======================================
--- /sbfury/collision.py Sat May 29 21:13:43 2010
+++ /sbfury/collision.py Sun Jun 6 16:14:06 2010
@@ -17,6 +17,7 @@
"""Show a impact effect for collisions."""

def __init__(self, x, y):
+ print "Creating hit effect"
image = common.load_image('effects/hit.png')

r = randint(200, 255)
=======================================
--- /sbfury/config.py Sat May 29 23:16:02 2010
+++ /sbfury/config.py Sun Jun 6 16:14:06 2010
@@ -16,7 +16,7 @@
VSYNC = False
PERSPECTIVE_FLOOR = True
MOVE_WINDOW = False
-SHOW_FRONT_LAYER = False
+SHOW_FRONT_LAYER = True
CAMERA_STEP = 20
SHAOLIN_INITIAL_JUMP_SPEED = 12
SHOW_COLLISION_BOXES = True
=======================================
--- /sbfury/main.py Sat May 29 23:16:02 2010
+++ /sbfury/main.py Sun Jun 6 16:14:06 2010
@@ -10,7 +10,7 @@
window = common.director.init(resizable=config.RESIZABLE,
vsync=config.VSYNC)

if config.DEBUG:
- first_scene = scene.game.Game(level=3)
+ first_scene = scene.game.Game(level=1)
else:
first_scene = scene.logo.Logo()

=======================================
--- /sbfury/scene/game.py Sat May 29 23:16:02 2010
+++ /sbfury/scene/game.py Sun Jun 6 16:14:06 2010
@@ -20,7 +20,10 @@


class UIControl(cocos.layer.Layer):
- """Front layer with tip for developers and beta testers."""
+ """Layer que contiene indicaciones para desarrolladores y beta testers.
+
+ Esta escribe en pantalla el mensaje "pulse F7" para avanzar de nivel.
+ """

is_event_handler = True

@@ -41,7 +44,7 @@
self.game.advance_level()

class Messages(cocos.layer.Layer):
- """Show text messages on screen like 'stage 1...' ."""
+ """Muestra mensajes en pantalla como 'stage 1' ... """

def __init__(self, game):
super(Messages, self).__init__()
@@ -110,6 +113,13 @@
self.stage.collision_manager.add_enemy(enemy)

def _create_player_and_stage(self):
+ """Genera al personaje principal y al objeto Stage.
+
+ Shaolin es el protagonista del juego, que se maneja
+ con el teclado. Mientras que Stage es uno de los
+ objetos principales de la escena, porque administra
+ colisiones y muestra el fondo de pantalla."""
+
shaolin_sprite = shaolin.shaolin.Shaolin()
control_layer = control.Control(shaolin_sprite)

=======================================
--- /sbfury/stage.py Sat May 29 21:13:43 2010
+++ /sbfury/stage.py Sun Jun 6 16:14:06 2010
@@ -15,6 +15,12 @@


class Stage(cocos.layer.Layer):
+ """Es un componente de la escena Game que muestra el escenario y
adminitra colisiones.
+
+ Stage es uno de los componentes principales, porque conoce
+ al objeto que tiene que seguir la cámara, imprime el escenario
+ simulando un scroll horizontal y además gestiona colisiones.
+ """

def __init__(self, number, object_to_follow):
super(Stage, self).__init__()
@@ -137,10 +143,15 @@
self.layer_4.draw()

def add_element(self, element):
- """Append a sprite in main layer."""
+ """Agrega un elemento como un sprite o nodo al layer principal.
+
+ Este método se tiene que llamar con cualquier personaje
+ que se quiera insertar en el escenario, como un enemigo o
+ el protagonista."""
self.main_layer.add(element)

def _create_collision_manager(self):
+ "Genera el administrador de colisiones, que avisa a los personajes
ante colisiones."
self.collision_manager = collision.CollisionManager()
self.add(self.collision_manager, z=1)


==============================================================================
Revision: f4c7eeb260
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Sun Jun 6 19:36:23 2010
Log: actualizando la documentacion del proyecto, colocando capturas de
pantalla, definiciones de modulos etc...
http://code.google.com/p/sbfury/source/detail?r=f4c7eeb260

Added:
/doc/build/doctrees/colisiones.doctree
/doc/build/doctrees/director.doctree
/doc/build/doctrees/environment.pickle
/doc/build/doctrees/escenas.doctree
/doc/build/doctrees/index.doctree
/doc/build/doctrees/shaolin.doctree
/doc/build/doctrees/stage.doctree
/doc/build/html/.buildinfo
/doc/build/html/_images/collision_debug_on.png
/doc/build/html/_images/game.png
/doc/build/html/_images/menu.png
/doc/build/html/_images/presents.png
/doc/build/html/_images/stage.png
/doc/build/html/_sources/colisiones.txt
/doc/build/html/_sources/director.txt
/doc/build/html/_sources/escenas.txt
/doc/build/html/_sources/index.txt
/doc/build/html/_sources/shaolin.txt
/doc/build/html/_sources/stage.txt
/doc/build/html/_static/basic.css
/doc/build/html/_static/default.css
/doc/build/html/_static/doctools.js
/doc/build/html/_static/file.png
/doc/build/html/_static/jquery.js
/doc/build/html/_static/minus.png
/doc/build/html/_static/plus.png
/doc/build/html/_static/pygments.css
/doc/build/html/_static/searchtools.js
/doc/build/html/colisiones.html
/doc/build/html/director.html
/doc/build/html/escenas.html
/doc/build/html/genindex.html
/doc/build/html/index.html
/doc/build/html/modindex.html
/doc/build/html/objects.inv
/doc/build/html/search.html
/doc/build/html/searchindex.js
/doc/build/html/shaolin.html
/doc/build/html/stage.html
/doc/source/colisiones.rst
/doc/source/director.rst
/doc/source/images/collision_debug_on.png
/doc/source/images/game.png
/doc/source/images/menu.png
/doc/source/images/presents.png
/doc/source/images/stage.png
/doc/source/shaolin.rst
/doc/source/stage.rst
Modified:
/doc/source/escenas.rst
/doc/source/index.rst
/sbfury/collision.py
/sbfury/config.py
/sbfury/sprite.py

=======================================
--- /dev/null
+++ /doc/build/doctrees/colisiones.doctree Sun Jun 6 19:36:23 2010
@@ -0,0 +1,330 @@
+ cdocutils.nodes
+document
+q ) q }q (U nametypesq }q (X
+ ¿como se genera un
colision?q NX sprite.Sprite.set_collisionq K X collisionmanagerq NX
+ colisionesq NuU substitution_defsq
+}q U parse_messagesq ]q
+U current_sourceq NU
+decorationq NU autofootnote_startq K U nameidsq }q (h U como-se-genera-un-colisionq h h h U collisionmanagerq h
U
+colisionesq uU childrenq ]q cdocutils.nodes
+section
+q ) q }q (U rawsourceq U U parentq
+h U sourceq
+cdocutils.nodes
+reprunicode
+q
+X= /home/hugoruscitti/proyectos/sbfury/doc/source/colisiones.rstq
+ q }q!bU tagnameq"U sectionq#U
+attributesq$}q%(U dupnamesq&]q'U classesq(]q)U backrefsq*]q+U idsq,]q-h aU namesq.]q/h
auU lineq0K U documentq1h h ]q2(cdocutils.nodes
+title
+q3) q4}q5(h X
+ Colisionesq6h
+h h
+h h"U titleq7h$}q8(h&]q9h(]q:h*]q;h,]q<h.]q=uh0K h1h h ]q>cdocutils.nodes
+Text
+q?X
+ Colisionesq@
+ qA}qB(h h6h
+h4ubaubcdocutils.nodes
+paragraph
+qC) qD}qE(h XÌ Durante el juego uno puede golpear a los enemigos y
+a su vez los enemigos nos pueden golpear. A este
+comportamiento se lo denomina colisiones. Y son las
+únicas interacciones entre personajes que existen.qFh
+h h
+h h"U
paragraphqGh$}qH(h&]qIh(]qJh*]qKh,]qLh.]qMuh0K h1h h ]qNh?XÌ Durante el
juego uno puede golpear a los enemigos y
+a su vez los enemigos nos pueden golpear. A este
+comportamiento se lo denomina colisiones. Y son las
+únicas interacciones entre personajes que existen.qO
+ qP}qQ(h hFh
+hDubaubcdocutils.nodes
+image
+qR) qS}qT(h X* .. image:: images/collision_debug_on.png
+
+qUh
+h h
+h h"U imageqVh$}qW(U uriqXX
+ images/collision_debug_on.pngqYh,]qZh*]q[h&]q\h(]q]U
+candidatesq^}q_U *hYsh.]q`uh0K h1h h ]qaubh ) qb}qc(h U h
+h h
+h h"h#h$}qd(h&]qeh(]qfh*]qgh,]qhh ah.]qih auh0K
+h1h h ]qj(h3) qk}ql(h X CollisionManagerqmh
+hbh
+h h"h7h$}qn(h&]qoh(]qph*]qqh,]qrh.]qsuh0K
+h1h h ]qth?X CollisionManagerqu
+ qv}qw(h hmh
+hkubaubhC) qx}qy(h XX Hay una instancia de este objeto dentro de
``Stage``, que
+a su vez es parte de ``Game``.qzh
+hbh
+h h"hGh$}q{(h&]q|h(]q}h*]q~h,]q h.]q uh0K h1h h ]q (h?X+ Hay una
instancia de este objeto dentro de q
+ q }q (h X+ Hay una instancia de este objeto dentro de q
+h
+hxubcdocutils.nodes
+literal
+q ) q }q (h X ``Stage``q h$}q (h&]q h(]q h*]q h,]q h.]q uh
+hxh ]q h?X Stageq
+ q }q (h U h
+h ubah"U literalq ubh?X , que
+a su vez es parte de q
+ q }q (h X , que
+a su vez es parte de q h
+hxubh ) q }q (h X ``Game``q h$}q (h&]q h(]q h*]q h,]q h.]q¡uh
+hxh ]q¢h?X Gameq£
+ q¤}q¥(h U h
+h ubah"h ubh?X .
+ q|}q§(h X .h
+hxubeubhC) q¨}q(c)(h X 3/4 ``CollisionManager`` se encarga de detectar si los
personajes
+se estan golpeando o no. Para ello tiene dos listas de personajes,
+una se utiliza para el protagonista y otra para los enemigos.qªh
+hbh
+h
h"hGh$}q<<(h&]q¬h(]q-h*]q(R)h,]q¯h.]q°uh0K h1h h ]q±(h ) q²}q³(h X ``CollisionManager``q´h$}qµ(h&]q¶h(]q·h*]q¸h,]q¹h.]qºuh
+h¨h ]q>>h?X CollisionManagerq 1/4
+ q 1/2}q 3/4(h U h
+h²ubah"h ubh?Xª se encarga de detectar si los personajes
+se estan golpeando o no. Para ello tiene dos listas de personajes,
+una se utiliza para el protagonista y otra para los enemigos.q¿
+ qÀ}qÁ(h Xª se encarga de detectar si los personajes
+se estan golpeando o no. Para ello tiene dos listas de personajes,
+una se utiliza para el protagonista y otra para los enemigos.qÂh
+h¨ubeubeubh ) qÃ}qÄ(h U h
+h h
+h h"h#h$}qÅ(h&]qÆh(]qÇh*]qÈh,]qÉh ah.]qÊh auh0K h1h h ]qË(h3) qÌ}qÍ(h X
+ ¿Como se genera un colision?qÎh
+hÃh
+h h"h7h$}qÏ(h&]qÐh(]qÑh*]qÒh,]qÓh.]qÔuh0K h1h h ]qÕh?X
+ ¿Como se genera un colision?qÖ
+ q×}qØ(h hÎh
+hÌubaubhC) qÙ}qÚ(h X El objeto ``CollisionManager`` en realidad se
actualiza todo
+el tiempo buscando atributos en los personajes para determinar
+si existen colisiones o no.qÛh
+hÃh
+h h"hGh$}qÜ(h&]qÝh(]qÞh*]qßh,]qàh.]qáuh0K h1h h ]qâ(h?X
+ El objeto qã
+ qä}qå(h X
+ El objeto qæh
+hÙubh ) qç}qè(h X ``CollisionManager``qéh$}qê(h&]qëh(]qìh*]qíh,]qîh.]qïuh
+hÙh ]qðh?X CollisionManagerqñ
+ qò}qó(h U h
+hçubah"h ubh?Xy en realidad se actualiza todo
+el tiempo buscando atributos en los personajes para determinar
+si existen colisiones o no.qô
+ qõ}qö(h Xy en realidad se actualiza todo
+el tiempo buscando atributos en los personajes para determinar
+si existen colisiones o no.q÷h
+hÙubeubhC) qø}qù(h XÕ Cuando un objeto quiere emitir una colisión
tienen que pasar
+dos cosas. Una es que el personaje estÃ(c) en una de
+las listas del ``CollisionManager``, cosa que se realiza
+con frecuencia cuando se genera el objeto::qúh
+hÃh
+h h"hGh$}qû(h&]qüh(]qýh*]qþh,]qÿh.]r uh0K
+h1h h ]r (h?X Cuando un objeto quiere emitir una colisión tienen
que pasar
+dos cosas. Una es que el personaje estÃ(c) en una de
+las listas del r
+ r }r (h X Cuando un objeto quiere emitir una colisión tienen
que pasar
+dos cosas. Una es que el personaje estÃ(c) en una de
+las listas del r h
+høubh ) r }r (h X ``CollisionManager``r h$}r (h&]r
+ h(]r h*]r h,]r
+ h.]r uh
+høh ]r h?X CollisionManagerr
+ r }r (h U h
+j ubah"h ubh?X@ , cosa que se realiza
+con frecuencia cuando se genera el objeto:r
+ r }r (h X@ , cosa que se realiza
+con frecuencia cuando se genera el objeto:r h
+høubeubcdocutils.nodes
+literal_block
+r ) r }r (h XO new_enemy = EnemyExample()...
+self.stage.collision_manager.add_enemy(new_enemy)r h
+hÃh
+h h"U
+literal_blockr h$}r
+ (U xml:spacer
+ U preserver
+ h,]r h*]r
h&]r! h(]r" h.]r# uh0K"h1h h ]r$ h?XO new_enemy =
EnemyExample()...
+self.stage.collision_manager.add_enemy(new_enemy)r%
+ r& }r' (h U h
+j ubaubhC) r( }r) (h X Lo segundo que tiene que hacer el
personaje para emitir una
+colisión es llamar al mÃ(c)todo ``set_collision`` de la clase
+``Sprite``:r* h
+hÃh
+h
h"hGh$}r+ (h&]r, h(]r- h*]r. h,]r/ h.]r0 uh0K&h1h h ]r1 (h?X[ Lo
segundo que tiene que hacer el personaje para emitir una
+colisión es llamar al mÃ(c)todo r2
+ r3 }r4 (h X[ Lo segundo que tiene que hacer el personaje para
emitir una
+colisión es llamar al mÃ(c)todo r5 h
+j( ubh ) r6 }r7 (h X ``set_collision``r8 h$}r9 (h&]r: h(]r; h*]r< h,]r= h.]r> uh
+j( h ]r? h?X
+ set_collisionr@
+ rA }rB (h U h
+j6 ubah"h ubh?X
+ de la clase
+rC
+ rD }rE (h X
+ de la clase
+rF h
+j( ubh ) rG }rH (h X
+ ``Sprite``rI h$}rJ (h&]rK h(]rL h*]rM h,]rN h.]rO uh
+j( h ]rP h?X SpriterQ
+ rR }rS (h U h
+jG ubah"h ubh?X :
+ rT }rU (h X :h
+j( ubeubcsphinx.addnodes
+index
+rV ) rW }rX (h U h
+hÃh
+Nh"U indexrY h$}rZ (h,]r[ h*]r\ h&]r] h(]r^ h.]r_ U entriesr` ]ra (U singlerb X' set_collision()
(sprite.Sprite
mÃ(c)todo)h h trc auh0Nh1h h ]rd ubcsphinx.addnodes
+desc
+re ) rf }rg (h U h
+hÃh
+Nh"U descrh h$}ri (U noindexrj h,]rk h*]rl h&]rm h(]rn h.]ro U desctyperp X methodrq uh0Nh1h h ]rr (csphinx.addnodes
+desc_signature
+rs ) rt }ru (h X# Sprite.set_collision(rect, force=1)rv h
+jf h
+U <autodoc>rw h"U desc_signaturerx h$}ry (h,]rz h ah*]r{ h&]r|
h(]r} h.]r~ h aU firstr uh0Nh1h h ]r (csphinx.addnodes
+desc_addname
+r ) r }r (h X Sprite.r h
+jt h
+jw h"U desc_addnamer
+ h$}r (h&]r h(]r h*]r h,]r h.]r uh0Nh1h h ]r h?X Sprite.r
+ r }r (h U h
+j ubaubcsphinx.addnodes
+desc_name
+r ) r }r (h X
+ set_collisionr h
+jt h
+jw h"U
desc_namer h$}r (h&]r h(]r h*]r h,]r h.]r uh0Nh1h h ]r h?X
+ set_collisionr
+ r }r (h U h
+j ubaubcsphinx.addnodes
+desc_parameterlist
+r ) r }r¡ (h U h
+jt h
+jw h"U desc_parameterlistr¢ h$}r£ (h&]r¤ h(]r¥ h*]r| h,]r§ h.]r¨ uh0Nh1h h ]r(c) (csphinx.addnodes
+desc_parameter
+rª ) r<< }r¬ (h X rectr- h
+j h
+jw h"U desc_parameterr(R) h$}r¯ (h&]r° h(]r± h*]r² h,]r³ h.]r´ uh0Nh1h h ]rµ h?X rectr¶
+ r· }r¸ (h U h
+j<< ubaubjª ) r¹ }rº (h X force=1r>> h
+j h
+jw h"j(R) h$}r 1/4 (h&]r 1/2 h(]r 3/4 h*]r¿ h,]rÀ h.]rÁ uh0Nh1h h ]r h?X force=1rÃ
+ rÄ }rÅ (h U h
+j¹ ubaubeubeubcsphinx.addnodes
+desc_content
+rÆ ) rÇ }rÈ (h U h
+jf h
+jw h"U desc_contentrÉ h$}rÊ (h&]rË h(]rÌ h*]rÍ h,]rÎ h.]rÏ uh0Nh1h h ]rÐ (hC) rÑ }rÒ (h X5 Define
un
area de colision para emitir una colisión.rÓ h
+jÇ h
+X] /home/hugoruscitti/proyectos/sbfury/sbfury/sprite.py:docstring of
sprite.Sprite.set_collisionrÔ h"hGh$}rÕ (h&]rÖ h(]r× h*]rØ h,]rÙ h.]rÚ uh0K h1h h ]rÛ h?X5 Define
un area de colision para emitir una colisión.rÜ
+ rÝ }rÞ (h jÓ h
+jÑ ubaubcdocutils.nodes
+definition_list
+rß ) rà }rá (h U h
+jÇ h
+jÔ h"U definition_listrâ h$}rã (h&]rä h(]rå h*]ræ h,]rç h.]rè uh0Nh1h h ]ré (cdocutils.nodes
+definition_list_item
+rê ) rë }rì (h XO `rect`: tuple
+El area de colisión, relativa a donde se encuentra el personaje.rí h
+jà h"U definition_list_itemrî h$}rï (h&]rð h(]rñ h*]rò h,]ró h.]rô uh0K h ]rõ (cdocutils.nodes
+term
+rö ) r÷ }rø (h U h$}rù (h&]rú h(]rû h*]rü h,]rý h.]rþ uh
+jë h ]rÿ (cdocutils.nodes
+title_reference
+r ) r }r (h X `rect`r h$}r (h&]r h(]r h*]r h,]r h.]r
uh
+j÷ h ]r
+ h?X rectr
+ r }r
+ (h U h
+j ubah"U title_referencer ubh?X : tupler
+ r }r (h X : tupler h
+j÷ ubeh"U termr ubcdocutils.nodes
+definition
+r ) r }r (h U h$}r (h&]r h(]r h*]r h,]r h.]r
+ uh
+jë h ]r
+ hC) r
+ }r (h XA El area de colisión, relativa a donde se encuentra el
personaje.r h
+j h"hGh$}r! (h&]r" h(]r# h*]r$ h,]r% h.]r& uh0K h ]r' h?XA El
area
de colisión, relativa a donde se encuentra el personaje.r(
+ r) }r* (h j h
+j
+ ubaubah"U
+definitionr+ ubeubjê ) r, }r- (h XS `force`: int
+Fuerza que imprime la colisión, puede ser 1, 2, 3 o 4 (como
máximo).r. h
+jà h
+jÔ h"jî h$}r/ (h&]r0 h(]r1 h*]r2 h,]r3 h.]r4 uh0K
h1h h ]r5 (jö ) r6 }r7 (h U h$}r8 (h&]r9 h(]r: h*]r; h,]r< h.]r= uh
+j, h ]r> (j ) r? }r@ (h X `force`rA h$}rB (h&]rC h(]rD h*]rE h,]rF h.]rG uh
+j6 h ]rH h?X forcerI
+ rJ }rK (h U h
+j? ubah"j ubh?X : intrL
+ rM }rN (h X : intrO h
+j6 ubeh"j ubj ) rP }rQ (h U h$}rR (h&]rS h(]rT h*]rU h,]rV h.]rW uh
+j, h ]rX hC) rY }rZ (h XF Fuerza que imprime la colisión, puede
ser 1, 2, 3 o 4 (como máximo).r[ h
+jP h"hGh$}r\ (h&]r] h(]r^ h*]r_ h,]r` h.]ra uh0K
+h ]rb h?XF Fuerza que imprime la colisión, puede ser 1, 2, 3 o 4
(como máximo).rc
+ rd }re (h j[ h
+jY ubaubah"j+ ubeubeubeubeubhC) rf }rg (h X Este metodo produce
un rectángulo que el ``CollisionManager``
+va a detectar y con eso va a ver si existe un colisión con
+alguien mas.rh h
+hÃh
+h
h"hGh$}ri (h&]rj h(]rk h*]rl h,]rm h.]rn uh0K-h1h h ]ro (h?X* Este
metodo produce un rectángulo que el rp
+ rq }rr (h X* Este metodo produce un rectángulo que el rs h
+jf ubh ) rt }ru (h X ``CollisionManager``rv h$}rw (h&]rx h(]ry h*]rz h,]r{ h.]r|
uh
+jf h ]r} h?X CollisionManagerr~
+ r }r (h U h
+jt ubah"h ubh?XI
+va a detectar y con eso va a ver si existe un colisión con
+alguien mas.r
+ r }r (h XI
+va a detectar y con eso va a ver si existe un colisión con
+alguien mas.r h
+jf ubeubcdocutils.nodes
+note
+r
+ ) r }r (h X
+ Si quieres que los rectangulos de colision se vean
+en pantalla tienes que habilitar la variable ``DEBUG`` en
+el archivo ``config.py``r h
+hÃh
+h
h"U noter h$}r (h&]r h(]r h*]r h,]r h.]r uh0Nh1h h ]r hC) r }r (h X
+ Si quieres que los rectangulos de colision se vean
+en pantalla tienes que habilitar la variable ``DEBUG`` en
+el archivo ``config.py``r h
+j h"hGh$}r (h&]r h(]r h*]r h,]r h.]r uh0K3h ]r (h?X` Si
quieres
que los rectangulos de colision se vean
+en pantalla tienes que habilitar la variable r
+ r }r (h X` Si quieres que los rectangulos de colision se vean
+en pantalla tienes que habilitar la variable r h
+j ubh ) r }r (h X
``DEBUG``r¡ h$}r¢ (h&]r£ h(]r¤ h*]r¥ h,]r| h.]r§ uh
+j h ]r¨ h?X DEBUGr(c)
+ rª }r<< (h U h
+j ubah"h ubh?X en
+el archivo r¬
+ r- }r(R) (h X en
+el archivo r¯ h
+j ubh ) r° }r± (h X
+ ``config.py``r² h$}r³ (h&]r´ h(]rµ h*]r¶ h,]r· h.]r¸ uh
+j h ]r¹ h?X config.pyrº
+ r>> }r 1/4 (h U h
+j° ubah"h ubeubaubeubeubah U U transformerr 1/2 NU
+footnote_refsr 3/4 }r¿ U refnamesrÀ }rÁ U symbol_footnotesr ]rà U autofootnote_refsrÄ ]rÅ U symbol_footnote_refsrÆ ]rÇ U
citationsrÈ ]rÉ h1h U current_linerÊ NU transform_messagesrË ]rÌ U reporterrÍ NU id_startrÎ K U
+autofootnotesrÏ ]rÐ U
+citation_refsrÑ }rÒ U indirect_targetsrÓ ]rÔ U settingsrÕ (cdocutils.frontend
+Values
+rÖ or× }rØ (U footnote_backlinksrÙ K U record_dependenciesrÚ NU rfc_base_urlrÛ U http://tools.ietf.org/html/rÜ U
tracebackrÝ K U pep_referencesrÞ NU strip_commentsrß NU
+toc_backlinksrà U entryrá U
+language_coderâ U enrã U
datestamprä NU report_levelrå K U _destinationræ NU
+halt_levelrç K U
+strip_classesrè Nh7NU
+error_encoding_error_handlerré U backslashreplacerê U debugrë NU embed_stylesheetrì U
+output_encoding_error_handlerrí U strictrî U
+sectnum_xformrï K U dump_transformsrð NU
+docinfo_xformrñ K U warning_streamrò NU pep_file_url_templateró U pep-%04drô U exit_status_levelrõ K U configrö NU strict_visitorr÷ NU cloak_email_addressesrø U
+trim_footnote_reference_spacerù U envrú NU dump_pseudo_xmlrû NU expose_internalsrü NU sectsubtitle_xformrý U source_linkrþ NU rfc_referencesrÿ NU output_encodingr U utf-8r U
+source_urlr NU input_encodingr U
utf-8-sigr U _disable_configr NU id_prefixr U U
tab_widthr K U error_encodingr U UTF-8r U _sourcer
+ U=/home/hugoruscitti/proyectos/sbfury/doc/source/colisiones.rstr U
generatorr NU dump_internalsr
+ NU pep_base_urlr U http://www.python.org/dev/peps/r U
+input_encoding_error_handlerr jî U auto_id_prefixr U idr U doctitle_xformr U strip_elements_with_classesr NU
+_config_filesr ]r U file_insertion_enabledr K U raw_enabledr K U
+dump_settingsr NubU symbol_footnote_startr K U idsr }r
+ (h jt h hbh h h hÃuU substitution_namesr
+ }r
+ h"h1h$}r (h&]r h,]r! h*]r" U sourcer# h h(]r$ h.]r% uU
footnotesr& ]r' U refidsr( }r) ub.
=======================================
--- /dev/null
+++ /doc/build/doctrees/director.doctree Sun Jun 6 19:36:23 2010
@@ -0,0 +1,75 @@
+ cdocutils.nodes
+document
+q ) q }q (U nametypesq }q (X el objeto
directorq NX cocos2dq K uU substitution_defsq }q U parse_messagesq
+]q U current_sourceq NU
+decorationq
+NU autofootnote_startq K U nameidsq }q (h U el-objeto-directorq h U cocos2dq uU childrenq ]q cdocutils.nodes
+section
+q ) q }q (U rawsourceq U U parentq h U sourceq cdocutils.nodes
+reprunicode
+q X; /home/hugoruscitti/proyectos/sbfury/doc/source/director.rstq
+
+ q
+}q
+bU tagnameq U sectionq U
+attributesq!}q"(U dupnamesq#]q$U classesq%]q&U backrefsq']q(U idsq)]q*h aU namesq+]q,h auU lineq-K U documentq.h h ]q/(cdocutils.nodes
+title
+q0) q1}q2(h X El objeto Directorq3h h h h
+h U titleq4h!}q5(h#]q6h%]q7h']q8h)]q9h+]q:uh-K h.h h ]q;cdocutils.nodes
+Text
+q<X El objeto Directorq=
+ q>}q?(h h3h h1ubaubcdocutils.nodes
+paragraph
+q@) qA}qB(h X El objeto director es el que mantiene en funcionamiento
+el juego, y es uno de los componentes principales de
+la biblioteca `cocos2d <http://cocos2d.org/>`_.qCh h h h
+h U paragraphqDh!}qE(h#]qFh%]qGh']qHh)]qIh+]qJuh-K h.h h ]qK(h<X{ El
objeto director es el que mantiene en funcionamiento
+el juego, y es uno de los componentes principales de
+la biblioteca qL
+ qM}qN(h X{ El objeto director es el que mantiene en funcionamiento
+el juego, y es uno de los componentes principales de
+la biblioteca qOh hAubcdocutils.nodes
+reference
+qP) qQ}qR(h X `cocos2d
<http://cocos2d.org/>`_qSh!}qT(U nameqUX cocos2dqVU refuriqWX http://cocos2d.org/qXh)]qYh']qZh#]q[h%]q\h+]q]uh hAh ]q^h<X cocos2dq_
+ q`}qa(h U h hQubah U referenceqbubcdocutils.nodes
+target
+qc) qd}qe(h X
<http://cocos2d.org/>qfh!}qg(U refuriqhhXh)]qih ah']qjh#]qkh%]qlh+]qmh auh hAh ]qnh U targetqoubh<X .
+ qp}qq(h X .h hAubeubh@) qr}qs(h X Este objeto se inicializa dentro
de la función ``main``
+del programa princial. Donde además se genera una escena
+para que comience a ejecutarse.qth h h h
+h hDh!}qu(h#]qvh%]qwh']qxh)]qyh+]qzuh-K h.h h ]q{(h<X0 Este objeto se
inicializa dentro de la función q|
+ q}}q~(h X0 Este objeto se inicializa dentro de la función
q h hrubcdocutils.nodes
+literal
+q ) q }q (h X ``main``q h!}q (h#]q
+h%]q h']q h)]q h+]q uh hrh ]q h<X mainq
+ q }q (h U h h ubah U literalq ubh<XZ
+del programa princial. Donde además se genera una escena
+para que comience a ejecutarse.q
+ q }q (h XZ
+del programa princial. Donde además se genera una escena
+para que comience a ejecutarse.q h hrubeubeubah U U transformerq NU
+footnote_refsq }q U refnamesq }q U symbol_footnotesq ]q U autofootnote_refsq ]q U symbol_footnote_refsq ]q U
citationsq ]q h.h U current_lineq NU transform_messagesq¡]q¢cdocutils.nodes
+system_message
+q£) q¤}q¥(h U h!}q|(h#]q§U levelq¨K h)]q(c)h']qªU sourceq<<h
+h%]q¬h+]q-U lineq(R)K U typeq¯U INFOq°uh ]q±h@) q²}q³(h U h!}q´(h#]qµh%]q¶h']q·h)]q¸h+]q¹uh h¤h ]qºh<X- Hyperlink
target "cocos2d"
is not referenced.q>>
+ q 1/4}q 1/2(h U h h²ubah hDubah U system_messageq 3/4 ubaU reporterq¿NU id_startqÀK U
+autofootnotesqÁ]qÂU
+citation_refsqÃ}qÄU indirect_targetsqÅ]qÆU settingsqÇ(cdocutils.frontend
+Values
+qÈoqÉ}qÊ(U footnote_backlinksqËK U record_dependenciesqÌNU rfc_base_urlqÍU http://tools.ietf.org/html/qÎU
tracebackqÏK U pep_referencesqÐNU strip_commentsqÑNU
+toc_backlinksqÒU entryqÓU
+language_codeqÔU enqÕU datestampqÖNU report_levelq×K U _destinationqØNU
+halt_levelqÙK U
+strip_classesqÚNh4NU
+error_encoding_error_handlerqÛU backslashreplaceqÜU debugqÝNU embed_stylesheetqÞ U
+output_encoding_error_handlerqßU strictqàU
+sectnum_xformqáK U dump_transformsqâNU
+docinfo_xformqãK U warning_streamqäNU pep_file_url_templateqåU pep-%04dqæU exit_status_levelqçK U configqèNU strict_visitorqéNU cloak_email_addressesqê U
+trim_footnote_reference_spaceqë U envqìNU dump_pseudo_xmlqíNU expose_internalsqîNU sectsubtitle_xformqï U source_linkqðNU rfc_referencesqñNU output_encodingqòU utf-8qóU
+source_urlqôNU input_encodingqõU utf-8-sigqöU _disable_configq÷NU
id_prefixqøU U
tab_widthqùK U error_encodingqúU UTF-8qûU _sourceqüU;/home/hugoruscitti/proyectos/sbfury/doc/source/director.rstqýU
generatorqþNU dump_internalsqÿNU pep_base_urlr U http://www.python.org/dev/peps/r U
+input_encoding_error_handlerr hàU auto_id_prefixr U idr U doctitle_xformr U strip_elements_with_classesr NU
+_config_filesr ]r U file_insertion_enabledr K U raw_enabledr
+ K U
+dump_settingsr NubU symbol_footnote_startr K U idsr
+ }r (h h h hduU substitution_namesr }r h h.h!}r (h#]r h)]r h']r U sourcer h
+h%]r h+]r uU footnotesr ]r U refidsr }r ub.
=======================================
--- /dev/null
+++ /doc/build/doctrees/environment.pickle Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/doctrees/escenas.doctree Sun Jun 6 19:36:23 2010
@@ -0,0 +1,135 @@
+ cdocutils.nodes
+document
+q ) q }q (U nametypesq }q (X ¿que son las escenas?q NX la escena
gameq NX escenasq NuU substitution_defsq }q
+U parse_messagesq ]q U current_sourceq
+NU
+decorationq NU autofootnote_startq K U nameidsq }q (h U que-son-las-escenasq h U la-escena-gameq h U escenasq uU childrenq ]q cdocutils.nodes
+section
+q ) q }q (U rawsourceq U U parentq h U sourceq
+cdocutils.nodes
+reprunicode
+q
+X: /home/hugoruscitti/proyectos/sbfury/doc/source/escenas.rstq
+
+ q }q bU tagnameq!U sectionq"U
+attributesq#}q$(U dupnamesq%]q&U classesq']q(U backrefsq)]q*U idsq+]q,h aU namesq-]q.h auU lineq/K U documentq0h h ]q1(cdocutils.nodes
+title
+q2) q3}q4(h X Escenasq5h h h
+h h!U titleq6h#}q7(h%]q8h']q9h)]q:h+]q;h-]q<uh/K h0h h ]q=cdocutils.nodes
+Text
+q>X Escenasq?
+ q@}qA(h h5h h3ubaubh ) qB}qC(h U h h h
+h h!h"h#}qD(h%]qEh']qFh)]qGh+]qHh ah-]qIh auh/K h0h h ]qJ(h2) qK}qL(h X ¿Que
son
las escenas?qMh hBh
+h h!h6h#}qN(h%]qOh']qPh)]qQh+]qRh-]qSuh/K h0h h ]qTh>X ¿Que son las
escenas?qU
+ qV}qW(h hMh hKubaubcdocutils.nodes
+paragraph
+qX) qY}qZ(h Xy El juego se encuentra dividido en componentes como la
presentación, el
+menú principal, la pantalla de crÃ(c)ditos... etc.q[h hBh
+h h!U paragraphq\h#}q](h%]q^h']q_h)]q`h+]qah-]qbuh/K h0h h ]qch>Xy El
juego se encuentra dividido en componentes como la presentación, el
+menú principal, la pantalla de crÃ(c)ditos... etc.qd
+ qe}qf(h h[h hYubaubhX) qg}qh(h Xq A cada uno de estos componentes se
los denonina escenas, por ejemplo,
+una escena es la pantalla de presentación:qih hBh
+h h!h\h#}qj(h%]qkh']qlh)]qmh+]qnh-]qouh/K
+h0h h ]qph>Xq A cada uno de estos componentes se los denonina escenas,
por ejemplo,
+una escena es la pantalla de presentación:qq
+ qr}qs(h hih hgubaubcdocutils.nodes
+image
+qt) qu}qv(h X .. image:: images/presents.png
+qwh hBh
+h h!U imageqxh#}qy(U uriqzX images/presents.pngq{h+]q|h)]q}h%]q~h']q U
+candidatesq }q U *h{sh-]q uh/K h0h h ]q ubhX) q }q
+(h X el menu principal:q h hBh
+h h!h\h#}q (h%]q h']q h)]q h+]q h-]q uh/K h0h h ]q h>X el menu
principal:q
+ q }q (h h h h ubaubht) q }q (h X .. image:: images/menu.png
+q h hBh
+h h!hxh#}q (U uriq X images/menu.pngq h+]q h)]q h%]q h']q h }q U *h sh-]q uh/K h0h h ]q ubhX) q }q (h X o
el
escenario de juego:q h hBh
+h h!h\h#}q¡(h%]q¢h']q£h)]q¤h+]q¥h-]q|uh/K h0h h ]q§h>X o el escenario
de juego:q¨
+ q(c)}qª(h h h h ubaubht) q<<}q¬(h X .. image:: images/game.png
+q-h hBh
+h h!hxh#}q(R)(U uriq¯X images/game.pngq°h+]q±h)]q²h%]q³h']q´h }qµU *h°sh-]q¶uh/K h0h h ]q·ubhX) q¸}q¹(h Xp De
forma
tal que cada uno de estos componentes es en realidad un
+objeto individual e independiente de los otros.qºh hBh
+h h!h\h#}q>>(h%]q 1/4 h']q 1/2 h)]q 3/4 h+]q¿h-]qÀuh/K h0h h ]qÁh>Xp De forma tal que
cada uno de estos componentes es en realidad un
+objeto individual e independiente de los otros.qÂ
+ qÃ}qÄ(h hºh h¸ubaubhX) qÅ}qÆ(h Xb Las escenas están dentro del módulo
``scene`` y todas heredan
+de la clase ``cocos.scece.Scene``.qÇh hBh
+h h!h\h#}qÈ(h%]qÉh']qÊh)]qËh+]qÌh-]qÍuh/K h0h h ]qÎ(h>X& Las escenas
están dentro del módulo qÏ
+ qÐ}qÑ(h X& Las escenas están dentro del módulo qÒh hÅubcdocutils.nodes
+literal
+qÓ) qÔ}qÕ(h X
``scene``qÖh#}q×(h%]qØh']qÙh)]qÚh+]qÛh-]qÜuh hÅh ]qÝh>X sceneqÞ
+ qß}qà(h U h hÔubah!U literalqáubh>X
+ y todas heredan
+de la clase qâ
+ qã}qä(h X
+ y todas heredan
+de la clase
qåh hÅubhÓ) qæ}qç(h X ``cocos.scece.Scene``qèh#}qé(h%]qêh']qëh)]qìh+]qíh-]qîuh hÅh ]qïh>X cocos.scece.Sceneqð
+ qñ}qò(h U h hæubah!háubh>X .
+ qó}qô(h X .h hÅubeubcdocutils.nodes
+note
+qõ) qö}q÷(h Xo Dentro del módulo ``sbfury`` hay un directorio llamado
``scene``
+donde se encuentra el código de cada escena.qøh hBh
+h h!U noteqùh#}qú(h%]qûh']qüh)]qýh+]qþh-]qÿuh/Nh0h h ]r hX) r }r (h Xo Dentro
del
módulo ``sbfury`` hay un directorio llamado ``scene``
+donde se encuentra el código de cada
escena.r h höh!h\h#}r (h%]r h']r h)]r h+]r h-]r
uh/K h ]r
+ (h>X Dentro del módulo r
+ r }r
+ (h X Dentro del módulo r h j ubhÓ) r }r (h X
+ ``sbfury``r h#}r (h%]r h']r h)]r h+]r h-]r uh j h ]r h>X sbfuryr
+ r }r (h U h j ubah!háubh>X hay un directorio llamado r
+
+ r
+ }r
+ (h X hay un directorio llamado r h j ubhÓ) r }r! (h X
``scene``r" h#}r# (h%]r$ h']r% h)]r& h+]r' h-]r( uh j h ]r) h>X scener*
+ r+ }r, (h U h j ubah!háubh>X.
+donde se encuentra el código de cada escena.r-
+ r. }r/ (h X.
+donde se encuentra el código de cada
escena.r0 h j ubeubaubeubh ) r1 }r2 (h U h h h
+h h!h"h#}r3 (h%]r4 h']r5 h)]r6 h+]r7 h ah-]r8 h auh/K#h0h h ]r9 (h2) r: }r; (h X La
escena
Gamer< h j1 h
+h h!h6h#}r= (h%]r> h']r? h)]r@ h+]rA h-]rB uh/K#h0h h ]rC h>X La
escena
GamerD
+ rE }rF (h j< h j: ubaubhX) rG }rH (h X] La escena ``Game``
carga un nivel y administra todos los personajes
+y objetos para ese nivel.rI h j1 h
+h h!h\h#}rJ (h%]rK h']rL h)]rM h+]rN h-]rO uh/K%h0h h ]rP (h>X
+ La escena rQ
+ rR }rS (h X
+ La escena
rT h jG ubhÓ) rU }rV (h X ``Game``rW h#}rX (h%]rY h']rZ h)]r[ h+]r\ h-]r] uh jG h ]r^ h>X Gamer_
+ r` }ra (h U h jU ubah!háubh>XK carga un nivel y administra todos
los personajes
+y objetos para ese nivel.rb
+ rc }rd (h XK carga un nivel y administra todos los personajes
+y objetos para ese nivel.re h jG ubeubhX) rf }rg (h X[ Al
iniciar el objeto ``Game`` se puede indicar el nivel
+que tiene que cargar, por ejemplo::rh h j1 h
+h h!h\h#}ri (h%]rj h']rk h)]rl h+]rm h-]rn uh/K(h0h h ]ro (h>X Al
iniciar
el objeto rp
+ rq }rr (h X Al iniciar el objeto
rs h jf ubhÓ) rt }ru (h X ``Game``rv h#}rw (h%]rx h']ry h)]rz h+]r{ h-]r|
uh jf h ]r} h>X Gamer~
+ r }r (h U h jt ubah!háubh>X= se puede indicar el nivel
+que tiene que cargar, por ejemplo:r
+ r }r (h X= se puede indicar el nivel
+que tiene que cargar, por ejemplo:r h jf ubeubcdocutils.nodes
+literal_block
+r
+ ) r }r (h X .. code-block:: pythonr h j1 h
+h h!U
+literal_blockr h#}r (U
xml:spacer U preserver h+]r h)]r h%]r h']r h-]r uh/K+h0h h ]r h>X ..
code-block:: pythonr
+ r }r (h U h j ubaubcdocutils.nodes
+block_quote
+r ) r }r (h U h j1 h
+h h!U block_quoter h#}r (h%]r h']r h)]r h+]r h-]r uh/Nh0h h ]r hX) r¡ }r¢ (h XE next_scene
=
scene.game.Game(level=2)
+common.director.run(next_scene)r£ h j h!h\h#}r¤ (h%]r¥ h']r| h)]r§ h+]r¨ h-]r(c) uh/K-h ]rª h>XE next_scene
=
scene.game.Game(level=2)
+common.director.run(next_scene)r<<
+ r¬ }r- (h j£ h j¡ ubaubaubeubeubah U U transformerr(R) NU
+footnote_refsr¯ }r° U refnamesr± }r² U symbol_footnotesr³ ]r´ U autofootnote_refsrµ ]r¶ U symbol_footnote_refsr· ]r¸ U
citationsr¹ ]rº h0h U current_liner>> NU transform_messagesr 1/4 ]r 1/2 U reporterr 3/4 NU id_startr¿ K U
+autofootnotesrÀ ]rÁ U
+citation_refsr }rà U indirect_targetsrÄ ]rÅ U settingsrÆ (cdocutils.frontend
+Values
+rÇ orÈ }rÉ (U footnote_backlinksrÊ K U record_dependenciesrË NU rfc_base_urlrÌ U http://tools.ietf.org/html/rÍ U
tracebackrÎ K U pep_referencesrÏ NU strip_commentsrÐ NU
+toc_backlinksrÑ U entryrÒ U
+language_coderÓ U enrÔ U
datestamprÕ NU report_levelrÖ K U _destinationr× NU
+halt_levelrØ K U
+strip_classesrÙ Nh6NU
+error_encoding_error_handlerrÚ U backslashreplacerÛ U debugrÜ NU embed_stylesheetrÝ U
+output_encoding_error_handlerrÞ U strictrß U
+sectnum_xformrà K U dump_transformsrá NU
+docinfo_xformrâ K U warning_streamrã NU pep_file_url_templaterä U pep-%04drå U exit_status_levelræ K U configrç NU strict_visitorrè NU cloak_email_addressesré U
+trim_footnote_reference_spacerê U envrë NU dump_pseudo_xmlrì NU expose_internalsrí NU sectsubtitle_xformrî U source_linkrï NU rfc_referencesrð NU output_encodingrñ U utf-8rò U
+source_urlró NU input_encodingrô U
utf-8-sigrõ U _disable_configrö NU id_prefixr÷ U U
tab_widthrø K U error_encodingrù U UTF-8rú U _sourcerû U:/home/hugoruscitti/proyectos/sbfury/doc/source/escenas.rstrü U
generatorrý NU dump_internalsrþ NU pep_base_urlrÿ U http://www.python.org/dev/peps/r U
+input_encoding_error_handlerr jß U auto_id_prefixr U idr U doctitle_xformr U strip_elements_with_classesr NU
+_config_filesr ]r U file_insertion_enabledr K U raw_enabledr
K U
+dump_settingsr
+ NubU symbol_footnote_startr K U idsr }r
+ (h hBh h h j1 uU substitution_namesr }r h!h0h#}r (h%]r h+]r h)]r U sourcer h h']r h-]r uU
footnotesr ]r U refidsr }r ub.
=======================================
--- /dev/null
+++ /doc/build/doctrees/index.doctree Sun Jun 6 19:36:23 2010
@@ -0,0 +1,90 @@
+ cdocutils.nodes
+document
+q ) q }q (U nametypesq }q (X& documentación de shaolin's blind
furyq NX indices and tablesq NuU substitution_defsq }q U parse_messagesq
+]q U current_sourceq NU
+decorationq
+NU autofootnote_startq K U nameidsq }q (h U%documentacion-de-shaolin-s-blind-furyq h U indices-and-tablesq uU childrenq ]q (cdocutils.nodes
+comment
+q ) q }q (U rawsourceq XË sbfury documentation master file, created by
+sphinx-quickstart on Sun May 30 01:36:32 2010.
+You can adapt this file completely to your liking, but it should at least
+contain the root `toctree`
directive.q U parentq h U sourceq cdocutils.nodes
+reprunicode
+q
+X8 /home/hugoruscitti/proyectos/sbfury/doc/source/index.rstq
+
+ q
+}q bU tagnameq U commentq!U
+attributesq"}q#(U
xml:spaceq$U preserveq%U idsq&]q'U backrefsq(]q)U dupnamesq*]q+U classesq,]q-U namesq.]q/uU lineq0K U documentq1h h ]q2cdocutils.nodes
+Text
+q3XË sbfury documentation master file, created by
+sphinx-quickstart on Sun May 30 01:36:32 2010.
+You can adapt this file completely to your liking, but it should at least
+contain the root `toctree` directive.q4
+ q5}q6(h U h h ubaubcdocutils.nodes
+section
+q7) q8}q9(h U h h h h
+h
U sectionq:h"}q;(h*]q<h,]q=h(]q>h&]q?h ah.]q@h auh0K h1h h ]qA(cdocutils.nodes
+title
+qB) qC}qD(h X& Documentación de Shaolin's Blind FuryqEh h8h h
+h
U titleqFh"}qG(h*]qHh,]qIh(]qJh&]qKh.]qLuh0K h1h h ]qMh3X& Documentación
de Shaolin's Blind FuryqN
+ qO}qP(h hEh hCubaubcdocutils.nodes
+paragraph
+qQ) qR}qS(h X
+ Contenido:qTh h8h h
+h U paragraphqUh"}qV(h*]qWh,]qXh(]qYh&]qZh.]q[uh0K h1h h ]q\h3X
+ Contenido:q]
+ q^}q_(h hTh hRubaubcsphinx.addnodes
+toctree
+q`) qa}qb(h U h h8h h
+h
U toctreeqch"}qd(U numberedqe h U indexqfU globqg h&]qhh(]qih*]qjh,]qkh.]qlU entriesqm]qn(NX directorqo qpNX escenasqq qrNX
+ colisionesqs qtNX stagequ qvNX shaolinqw qxeU hiddenqy U includefilesqz]q{(hohqhshuhweU maxdepthq|
K uh0Nh1h h ]q}ubeubh7) q~}q (h U h h h h
+h h:h"}q (h*]q h,]q h(]q h&]q h ah.]q
+h auh0K h1h h ]q (hB) q }q (h X Indices and tablesq h h~h h
+h hFh"}q (h*]q h,]q h(]q h&]q h.]q uh0K h1h h ]q h3X Indices and
tablesq
+ q }q (h h h h ubaubcdocutils.nodes
+bullet_list
+q ) q }q (h U h h~h h
+h
U bullet_listq h"}q (U bulletq X *h&]q h(]q h*]q h,]q h.]q uh0K h1h h ]q (cdocutils.nodes
+list_item
+q ) q¡}q¢(h X :ref:`genindex`q£h h h h
+h U
list_itemq¤h"}q¥(h*]q|h,]q§h(]q¨h&]q(c)h.]qªuh0Nh1h h ]q<<hQ) q¬}q-(h h£h h¡h
hUh"}q(R)(h*]q¯h,]q°h(]q±h&]q²h.]q³uh0K h ]q´csphinx.addnodes
+pending_xref
+qµ) q¶}q·(h h£h h¬h
U pending_xrefq¸h"}q¹(U reftypeqºX refq>>U modnameq 1/4 NU
+refcaptionq 1/2 U refdocq 3/4 hfh&]q¿h(]qÀU classnameqÁNh*]qÂh,]qÃh.]qÄU
reftargetqÅX genindexqÆuh0K h ]qÇcdocutils.nodes
+emphasis
+qÈ) qÉ}qÊ(h h£h"}qË(h*]qÌh,]qÍU xrefqÎah(]qÏh&]qÐh.]qÑuh h¶h ]qÒh3X genindexqÓ
+ qÔ}qÕ(h U h hÉubah
U emphasisqÖubaubaubaubh ) q×}qØ(h X :ref:`modindex`qÙh h h h
+h h¤h"}qÚ(h*]qÛh,]qÜh(]qÝh&]qÞh.]qßuh0Nh1h h ]qàhQ) qá}qâ(h hÙh h×h
hUh"}qã(h*]qäh,]qåh(]qæh&]qçh.]qèuh0K h ]qéhµ) qê}që(h hÙh háh
h¸h"}qì(U reftypeqíX refqîU modnameqïNU
+refcaptionqð h 3/4 hfh&]qñh(]qòU
classnameqóNh*]qôh,]qõh.]qöhÅX modindexq÷uh0K h ]qøhÈ) qù}qú(h hÙh"}qû(h*]qüh,]qýhÎah(]qþh&]qÿh.]r uh hêh ]r h3X modindexr
+ r }r (h U h hùubah hÖubaubaubaubh ) r }r (h X :ref:`search`
+r h h h h
+h h¤h"}r (h*]r h,]r
+ h(]r h&]r h.]r
+ uh0Nh1h h ]r hQ) r }r (h X
+ :ref:`search`r h j h
hUh"}r (h*]r h,]r h(]r h&]r h.]r uh0K h ]r hµ) r }r (h j h j h
h¸h"}r (U reftyper
+ X refr
+ U modnamer
+ NU
+refcaptionr h 3/4 hfh&]r h(]r! U
classnamer" Nh*]r# h,]r$ h.]r% hÅX searchr& uh0K h ]r' hÈ) r( }r) (h j h"}r* (h*]r+ h,]r, hÎah(]r- h&]r. h.]r/ uh j h ]r0 h3X searchr1
+ r2 }r3 (h U h j( ubah hÖubaubaubaubeubeubeh U U transformerr4 NU
+footnote_refsr5 }r6 U refnamesr7 }r8 U symbol_footnotesr9 ]r: U autofootnote_refsr; ]r< U symbol_footnote_refsr= ]r> U
citationsr? ]r@ h1h U current_linerA NU transform_messagesrB ]rC U reporterrD NU id_startrE K U
+autofootnotesrF ]rG U
+citation_refsrH }rI U indirect_targetsrJ ]rK U settingsrL (cdocutils.frontend
+Values
+rM orN }rO (U footnote_backlinksrP K U record_dependenciesrQ NU rfc_base_urlrR U http://tools.ietf.org/html/rS U
tracebackrT K U pep_referencesrU NU strip_commentsrV NU
+toc_backlinksrW U entryrX U
+language_coderY U enrZ U
datestampr[ NU report_levelr\ K U _destinationr] NU
+halt_levelr^ K U
+strip_classesr_ NhFNU
+error_encoding_error_handlerr` U backslashreplacera U debugrb NU embed_stylesheetrc U
+output_encoding_error_handlerrd U strictre U
+sectnum_xformrf K U dump_transformsrg NU
+docinfo_xformrh K U warning_streamri NU pep_file_url_templaterj U pep-%04drk U exit_status_levelrl K U configrm NU strict_visitorrn NU cloak_email_addressesro U
+trim_footnote_reference_spacerp U envrq NU dump_pseudo_xmlrr NU expose_internalsrs NU sectsubtitle_xformrt U source_linkru NU rfc_referencesrv NU output_encodingrw U utf-8rx U
+source_urlry NU input_encodingrz U utf-8-sigr{ U _disable_configr|
NU id_prefixr} U U
tab_widthr~ K U error_encodingr U UTF-8r U _sourcer U8/home/hugoruscitti/proyectos/sbfury/doc/source/index.rstr U
generatorr NU dump_internalsr NU pep_base_urlr
+ U http://www.python.org/dev/peps/r U
+input_encoding_error_handlerr je U auto_id_prefixr U idr U doctitle_xformr U strip_elements_with_classesr NU
+_config_filesr ]r U file_insertion_enabledr K U raw_enabledr K U
+dump_settingsr NubU symbol_footnote_startr K U idsr }r (h h~h h8uU substitution_namesr }r h
h1h"}r (h*]r h&]r h(]r U sourcer h
+h,]r h.]r uU footnotesr ]r U refidsr }r ub.
=======================================
--- /dev/null
+++ /doc/build/doctrees/shaolin.doctree Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/doctrees/stage.doctree Sun Jun 6 19:36:23 2010
@@ -0,0 +1,94 @@
+ cdocutils.nodes
+document
+q ) q }q (U
nametypesq }q X stageq NsU substitution_defsq }q U parse_messagesq ]q
+U current_sourceq NU
+decorationq NU autofootnote_startq
+K U nameidsq }q h U stageq sU childrenq ]q cdocutils.nodes
+section
+q ) q }q (U rawsourceq U U parentq h U sourceq cdocutils.nodes
+reprunicode
+q X8 /home/hugoruscitti/proyectos/sbfury/doc/source/stage.rstq
+ q }q
+bU tagnameq
+U sectionq
+U
+attributesq }q
(U dupnamesq!]q"U classesq#]q$U backrefsq%]q&U idsq']q(h aU namesq)]q*h auU lineq+K U documentq,h h ]q-(cdocutils.nodes
+title
+q.) q/}q0(h X Stageq1h h h h h
+U titleq2h }q3(h!]q4h#]q5h%]q6h']q7h)]q8uh+K h,h h ]q9cdocutils.nodes
+Text
+q:X Stageq;
+ q<}q=(h h1h h/ubaubcdocutils.nodes
+paragraph
+q>) q?}q@(h Xð El objeto Stage es uno de los componentes mas importantes
+de la escena ``Game``, porque hace dos tareas: Imprime
+el escenario simulando un scroll horizontal y a la vez
+administra las colisiones con un objeto interno llamado
+CollisionManagerqAh h h h h
+U paragraphqBh }qC(h!]qDh#]qEh%]qFh']qGh)]qHuh+K h,h h ]qI(h:XG El
objeto Stage es uno de los componentes mas importantes
+de la escena qJ
+ qK}qL(h XG El objeto Stage es uno de los componentes mas importantes
+de la escena qMh h?ubcdocutils.nodes
+literal
+qN) qO}qP(h X ``Game``qQh }qR(h!]qSh#]qTh%]qUh']qVh)]qWuh h?h ]qXh:X GameqY
+ qZ}q[(h U h hOubah
+U literalq\ubh:X¡ , porque hace dos tareas: Imprime
+el escenario simulando un scroll horizontal y a la vez
+administra las colisiones con un objeto interno llamado
+CollisionManagerq]
+ q^}q_(h X¡ , porque hace dos tareas: Imprime
+el escenario simulando un scroll horizontal y a la vez
+administra las colisiones con un objeto interno llamado
+CollisionManagerq`h h?ubeubcdocutils.nodes
+image
+qa) qb}qc(h X
+ .. image:: images/stage.png
+
+
+qdh h h h h
+U imageqeh }qf(U uriqgX images/stage.pngqhh']qih%]qjh!]qkh#]qlU
+candidatesqm}qnU *hhsh)]qouh+K h,h h ]qpubcdocutils.nodes
+note
+qq) qr}qs(h X} PodÃ(c)s ver en funcionamiento el módulo ``stage.py``
aislado
+si ejecutás ``python stage.py`` desde el directorio ``sfbury``.qth h h h h
+U notequh }qv(h!]qwh#]qxh%]qyh']qzh)]q{uh+Nh,h h ]q|
h>) q}}q~(h X} PodÃ(c)s ver en funcionamiento el módulo ``stage.py``
aislado
+si ejecutás ``python stage.py`` desde el directorio ``sfbury``.q h hrh
+hBh }q (h!]q h#]q h%]q h']q h)]q
+uh+K h ]q (h:X( PodÃ(c)s ver en funcionamiento el módulo q
+ q }q (h X( PodÃ(c)s ver en funcionamiento el módulo
q h h}ubhN) q }q (h X ``stage.py``q h }q (h!]q h#]q h%]q h']q h)]q uh h}h ]q h:X stage.pyq
+ q }q (h U h h ubah
+h\ubh:X aislado
+si ejecutás q
+ q }q (h X aislado
+si ejecutás q h h}ubhN) q }q (h X ``python
stage.py``q h }q (h!]q h#]q¡h%]q¢h']q£h)]q¤uh h}h ]q¥h:X python
stage.pyq|
+ q§}q¨(h U h h ubah
+h\ubh:X desde el directorio q(c)
+ qª}q<<(h X desde el directorio q¬h h}ubhN) q-}q(R)(h X
+ ``sfbury``q¯h }q°(h!]q±h#]q²h%]q³h']q´h)]qµuh h}h ]q¶h:X sfburyq·
+ q¸}q¹(h U h h-ubah
+h\ubh:X .
+ qº}q>>(h X .h h}ubeubaubeubah U U transformerq 1/4 NU
+footnote_refsq 1/2}q 3/4 U refnamesq¿}qÀU symbol_footnotesqÁ]qÂU autofootnote_refsqÃ]qÄU symbol_footnote_refsqÅ]qÆU
citationsqÇ]qÈh,h U current_lineqÉNU transform_messagesqÊ]qËU reporterqÌNU id_startqÍK U
+autofootnotesqÎ]qÏU
+citation_refsqÐ}qÑU indirect_targetsqÒ]qÓU settingsqÔ(cdocutils.frontend
+Values
+qÕoqÖ}q×(U footnote_backlinksqØK U record_dependenciesqÙNU rfc_base_urlqÚU http://tools.ietf.org/html/qÛU
tracebackqÜK U pep_referencesqÝNU strip_commentsqÞNU
+toc_backlinksqßU entryqàU
+language_codeqáU enqâU datestampqãNU report_levelqäK U _destinationqåNU
+halt_levelqæK U
+strip_classesqçNh2NU
+error_encoding_error_handlerqèU backslashreplaceqéU debugqêNU embed_stylesheetqë U
+output_encoding_error_handlerqìU strictqíU
+sectnum_xformqîK U dump_transformsqïNU
+docinfo_xformqðK U warning_streamqñNU pep_file_url_templateqòU pep-%04dqóU exit_status_levelqôK U configqõNU strict_visitorqöNU cloak_email_addressesq÷ U
+trim_footnote_reference_spaceqø U envqùNU dump_pseudo_xmlqúNU expose_internalsqûNU sectsubtitle_xformqü U source_linkqýNU rfc_referencesqþNU output_encodingqÿU utf-8r U
+source_urlr NU input_encodingr U
utf-8-sigr U _disable_configr NU id_prefixr U U
tab_widthr K U error_encodingr U UTF-8r U _sourcer
U8/home/hugoruscitti/proyectos/sbfury/doc/source/stage.rstr
+ U generatorr NU dump_internalsr NU pep_base_urlr
+ U http://www.python.org/dev/peps/r U
+input_encoding_error_handlerr híU auto_id_prefixr U idr U doctitle_xformr U strip_elements_with_classesr NU
+_config_filesr ]r U file_insertion_enabledr K U raw_enabledr K U
+dump_settingsr NubU symbol_footnote_startr K U idsr }r h h sU substitution_namesr
+ }r
+ h
+h,h }r
+ (h!]r h']r h%]r! U sourcer" h h#]r# h)]r$ uU
footnotesr% ]r& U refidsr' }r( ub.
=======================================
--- /dev/null
+++ /doc/build/html/.buildinfo Sun Jun 6 19:36:23 2010
@@ -0,0 +1,4 @@
+# Sphinx build info version 1
+# This file hashes the configuration used when building these files. When
it is not found, a full rebuild will be done.
+config: e7686572ca255f443e6a2add9a2096dc
+tags: fbb0d17656682115ca4d033fb2f83ba1
=======================================
--- /dev/null
+++ /doc/build/html/_images/collision_debug_on.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/html/_images/game.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/html/_images/menu.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/html/_images/presents.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/html/_images/stage.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/build/html/_sources/colisiones.txt Sun Jun 6 19:36:23 2010
@@ -0,0 +1,53 @@
+Colisiones
+==========
+
+Durante el juego uno puede golpear a los enemigos y
+a su vez los enemigos nos pueden golpear. A este
+comportamiento se lo denomina colisiones. Y son las
+únicas interacciones entre personajes que existen.
+
+.. image:: images/collision_debug_on.png
+
+
+CollisionManager
+----------------
+
+Hay una instancia de este objeto dentro de ``Stage``, que
+a su vez es parte de ``Game``.
+
+``CollisionManager`` se encarga de detectar si los personajes
+se estan golpeando o no. Para ello tiene dos listas de personajes,
+una se utiliza para el protagonista y otra para los enemigos.
+
+¿Como se genera un colision?
+----------------------------
+
+El objeto ``CollisionManager`` en realidad se actualiza todo
+el tiempo buscando atributos en los personajes para determinar
+si existen colisiones o no.
+
+Cuando un objeto quiere emitir una colisión tienen que pasar
+dos cosas. Una es que el personaje esté en una de
+las listas del ``CollisionManager``, cosa que se realiza
+con frecuencia cuando se genera el objeto::
+
+ new_enemy = EnemyExample()...
+ self.stage.collision_manager.add_enemy(new_enemy)
+
+
+Lo segundo que tiene que hacer el personaje para emitir una
+colisión es llamar al método ``set_collision`` de la clase
+``Sprite``:
+
+.. automethod:: sprite.Sprite.set_collision
+
+
+Este metodo produce un rectángulo que el ``CollisionManager``
+va a detectar y con eso va a ver si existe un colisión con
+alguien mas.
+
+.. note::
+
+ Si quieres que los rectangulos de colision se vean
+ en pantalla tienes que habilitar la variable ``DEBUG`` en
+ el archivo ``config.py``
=======================================
--- /dev/null
+++ /doc/build/html/_sources/director.txt Sun Jun 6 19:36:23 2010
@@ -0,0 +1,10 @@
+El objeto Director
+==================
+
+El objeto director es el que mantiene en funcionamiento
+el juego, y es uno de los componentes principales de
+la biblioteca `cocos2d <http://cocos2d.org/>`_.
+
+Este objeto se inicializa dentro de la función ``main``
+del programa princial. Donde además se genera una escena
+para que comience a ejecutarse.
=======================================
--- /dev/null
+++ /doc/build/html/_sources/escenas.txt Sun Jun 6 19:36:23 2010
@@ -0,0 +1,46 @@
+Escenas
+=======
+
+¿Que son las escenas?
+---------------------
+
+El juego se encuentra dividido en componentes como la presentación, el
+menú principal, la pantalla de créditos... etc.
+
+A cada uno de estos componentes se los denonina escenas, por ejemplo,
+una escena es la pantalla de presentación:
+
+.. image:: images/presents.png
+
+el menu principal:
+
+.. image:: images/menu.png
+
+o el escenario de juego:
+
+.. image:: images/game.png
+
+De forma tal que cada uno de estos componentes es en realidad un
+objeto individual e independiente de los otros.
+
+Las escenas están dentro del módulo ``scene`` y todas heredan
+de la clase ``cocos.scece.Scene``.
+
+.. note::
+
+ Dentro del módulo ``sbfury`` hay un directorio llamado ``scene``
+ donde se encuentra el código de cada escena.
+
+La escena Game
+--------------
+
+La escena ``Game`` carga un nivel y administra todos los personajes
+y objetos para ese nivel.
+
+Al iniciar el objeto ``Game`` se puede indicar el nivel
+que tiene que cargar, por ejemplo::
+
+.. code-block:: python
+
+ next_scene = scene.game.Game(level=2)
+ common.director.run(next_scene)
=======================================
--- /dev/null
+++ /doc/build/html/_sources/index.txt Sun Jun 6 19:36:23 2010
@@ -0,0 +1,27 @@
+.. sbfury documentation master file, created by
+ sphinx-quickstart on Sun May 30 01:36:32 2010.
+ You can adapt this file completely to your liking, but it should at
least
+ contain the root `toctree` directive.
+
+Documentación de Shaolin's Blind Fury
+=====================================
+
+Contenido:
+
+.. toctree::
+ :maxdepth: 2
+
+ director
+ escenas
+ colisiones
+ stage
+ shaolin
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
=======================================
--- /dev/null
+++ /doc/build/html/_sources/shaolin.txt Sun Jun 6 19:36:23 2010
@@ -0,0 +1,4 @@
+Shaolin, el protagonista
+========================
+
+
=======================================
--- /dev/null
+++ /doc/build/html/_sources/stage.txt Sun Jun 6 19:36:23 2010
@@ -0,0 +1,18 @@
+Stage
+=====
+
+El objeto Stage es uno de los componentes mas importantes
+de la escena ``Game``, porque hace dos tareas: Imprime
+el escenario simulando un scroll horizontal y a la vez
+administra las colisiones con un objeto interno llamado
+CollisionManager
+
+
+.. image:: images/stage.png
+
+
+
+.. note::
+
+ Podés ver en funcionamiento el módulo ``stage.py`` aislado
+ si ejecutás ``python stage.py`` desde el directorio ``sfbury``.
=======================================
--- /dev/null
+++ /doc/build/html/_static/basic.css Sun Jun 6 19:36:23 2010
@@ -0,0 +1,417 @@
+/**
+ * Sphinx stylesheet -- basic theme
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+/* -- main layout
----------------------------------------------------------- */
+
+div.clearer {
+ clear: both;
+}
+
+/* -- relbar
---------------------------------------------------------------- */
+
+div.related {
+ width: 100%;
+ font-size: 90%;
+}
+
+div.related h3 {
+ display: none;
+}
+
+div.related ul {
+ margin: 0;
+ padding: 0 0 0 10px;
+ list-style: none;
+}
+
+div.related li {
+ display: inline;
+}
+
+div.related li.right {
+ float: right;
+ margin-right: 5px;
+}
+
+/* -- sidebar
--------------------------------------------------------------- */
+
+div.sphinxsidebarwrapper {
+ padding: 10px 5px 0 10px;
+}
+
+div.sphinxsidebar {
+ float: left;
+ width: 230px;
+ margin-left: -100%;
+ font-size: 90%;
+}
+
+div.sphinxsidebar ul {
+ list-style: none;
+}
+
+div.sphinxsidebar ul ul,
+div.sphinxsidebar ul.want-points {
+ margin-left: 20px;
+ list-style: square;
+}
+
+div.sphinxsidebar ul ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+div.sphinxsidebar form {
+ margin-top: 10px;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #98dbcc;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+
+img {
+ border: 0;
+}
+
+/* -- search page
----------------------------------------------------------- */
+
+ul.search {
+ margin: 10px 0 0 20px;
+ padding: 0;
+}
+
+ul.search li {
+ padding: 5px 0 5px 20px;
+ background-image: url(file.png);
+ background-repeat: no-repeat;
+ background-position: 0 7px;
+}
+
+ul.search li a {
+ font-weight: bold;
+}
+
+ul.search li div.context {
+ color: #888;
+ margin: 2px 0 0 30px;
+ text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+ font-weight: bold;
+}
+
+/* -- index page
------------------------------------------------------------ */
+
+table.contentstable {
+ width: 90%;
+}
+
+table.contentstable p.biglink {
+ line-height: 150%;
+}
+
+a.biglink {
+ font-size: 1.3em;
+}
+
+span.linkdescr {
+ font-style: italic;
+ padding-top: 5px;
+ font-size: 90%;
+}
+
+/* -- general index
--------------------------------------------------------- */
+
+table.indextable td {
+ text-align: left;
+ vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+ height: 10px;
+}
+
+table.indextable tr.cap {
+ margin-top: 10px;
+ background-color: #f2f2f2;
+}
+
+img.toggler {
+ margin-right: 3px;
+ margin-top: 3px;
+ cursor: pointer;
+}
+
+/* -- general body styles
--------------------------------------------------- */
+
+a.headerlink {
+ visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+ visibility: visible;
+}
+
+div.body p.caption {
+ text-align: inherit;
+}
+
+div.body td {
+ text-align: left;
+}
+
+.field-list ul {
+ padding-left: 1em;
+}
+
+.first {
+ margin-top: 0 !important;
+}
+
+p.rubric {
+ margin-top: 30px;
+ font-weight: bold;
+}
+
+/* -- sidebars
-------------------------------------------------------------- */
+
+div.sidebar {
+ margin: 0 0 0.5em 1em;
+ border: 1px solid #ddb;
+ padding: 7px 7px 0 7px;
+ background-color: #ffe;
+ width: 40%;
+ float: right;
+}
+
+p.sidebar-title {
+ font-weight: bold;
+}
+
+/* -- topics
---------------------------------------------------------------- */
+
+div.topic {
+ border: 1px solid #ccc;
+ padding: 7px 7px 0 7px;
+ margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 10px;
+}
+
+/* -- admonitions
----------------------------------------------------------- */
+
+div.admonition {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ padding: 7px;
+}
+
+div.admonition dt {
+ font-weight: bold;
+}
+
+div.admonition dl {
+ margin-bottom: 0;
+}
+
+p.admonition-title {
+ margin: 0px 10px 5px 0px;
+ font-weight: bold;
+}
+
+div.body p.centered {
+ text-align: center;
+ margin-top: 25px;
+}
+
+/* -- tables
---------------------------------------------------------------- */
+
+table.docutils {
+ border: 0;
+ border-collapse: collapse;
+}
+
+table.docutils td, table.docutils th {
+ padding: 1px 8px 1px 0;
+ border-top: 0;
+ border-left: 0;
+ border-right: 0;
+ border-bottom: 1px solid #aaa;
+}
+
+table.field-list td, table.field-list th {
+ border: 0 !important;
+}
+
+table.footnote td, table.footnote th {
+ border: 0 !important;
+}
+
+th {
+ text-align: left;
+ padding-right: 5px;
+}
+
+/* -- other body styles
----------------------------------------------------- */
+
+dl {
+ margin-bottom: 15px;
+}
+
+dd p {
+ margin-top: 0px;
+}
+
+dd ul, dd table {
+ margin-bottom: 10px;
+}
+
+dd {
+ margin-top: 3px;
+ margin-bottom: 10px;
+ margin-left: 30px;
+}
+
+dt:target, .highlight {
+ background-color: #fbe54e;
+}
+
+dl.glossary dt {
+ font-weight: bold;
+ font-size: 1.1em;
+}
+
+.field-list ul {
+ margin: 0;
+ padding-left: 1em;
+}
+
+.field-list p {
+ margin: 0;
+}
+
+.refcount {
+ color: #060;
+}
+
+.optional {
+ font-size: 1.3em;
+}
+
+.versionmodified {
+ font-style: italic;
+}
+
+.system-message {
+ background-color: #fda;
+ padding: 5px;
+ border: 3px solid red;
+}
+
+.footnote:target {
+ background-color: #ffa
+}
+
+.line-block {
+ display: block;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+.line-block .line-block {
+ margin-top: 0;
+ margin-bottom: 0;
+ margin-left: 1.5em;
+}
+
+/* -- code displays
--------------------------------------------------------- */
+
+pre {
+ overflow: auto;
+}
+
+td.linenos pre {
+ padding: 5px 0px;
+ border: 0;
+ background-color: transparent;
+ color: #aaa;
+}
+
+table.highlighttable {
+ margin-left: 0.5em;
+}
+
+table.highlighttable td {
+ padding: 0 0.5em 0 0.5em;
+}
+
+tt.descname {
+ background-color: transparent;
+ font-weight: bold;
+ font-size: 1.2em;
+}
+
+tt.descclassname {
+ background-color: transparent;
+}
+
+tt.xref, a tt {
+ background-color: transparent;
+ font-weight: bold;
+}
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+ background-color: transparent;
+}
+
+/* -- math display
---------------------------------------------------------- */
+
+img.math {
+ vertical-align: middle;
+}
+
+div.body div.math p {
+ text-align: center;
+}
+
+span.eqno {
+ float: right;
+}
+
+/* -- printout stylesheet
--------------------------------------------------- */
+
+@media print {
+ div.document,
+ div.documentwrapper,
+ div.bodywrapper {
+ margin: 0 !important;
+ width: 100%;
+ }
+
+ div.sphinxsidebar,
+ div.related,
+ div.footer,
+ #top-link {
+ display: none;
+ }
+}
=======================================
--- /dev/null
+++ /doc/build/html/_static/default.css Sun Jun 6 19:36:23 2010
@@ -0,0 +1,230 @@
+/**
+ * Sphinx stylesheet -- default theme
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+
+@import url("basic.css");
+
+/* -- page layout
----------------------------------------------------------- */
+
+body {
+ font-family: sans-serif;
+ font-size: 100%;
+ background-color: #11303d;
+ color: #000;
+ margin: 0;
+ padding: 0;
+}
+
+div.document {
+ background-color: #1c4e63;
+}
+
+div.documentwrapper {
+ float: left;
+ width: 100%;
+}
+
+div.bodywrapper {
+ margin: 0 0 0 230px;
+}
+
+div.body {
+ background-color: #ffffff;
+ color: #000000;
+ padding: 0 20px 30px 20px;
+}
+
+div.footer {
+ color: #ffffff;
+ width: 100%;
+ padding: 9px 0 9px 0;
+ text-align: center;
+ font-size: 75%;
+}
+
+div.footer a {
+ color: #ffffff;
+ text-decoration: underline;
+}
+
+div.related {
+ background-color: #133f52;
+ line-height: 30px;
+ color: #ffffff;
+}
+
+div.related a {
+ color: #ffffff;
+}
+
+div.sphinxsidebar {
+}
+
+div.sphinxsidebar h3 {
+ font-family: 'Trebuchet MS', sans-serif;
+ color: #ffffff;
+ font-size: 1.4em;
+ font-weight: normal;
+ margin: 0;
+ padding: 0;
+}
+
+div.sphinxsidebar h3 a {
+ color: #ffffff;
+}
+
+div.sphinxsidebar h4 {
+ font-family: 'Trebuchet MS', sans-serif;
+ color: #ffffff;
+ font-size: 1.3em;
+ font-weight: normal;
+ margin: 5px 0 0 0;
+ padding: 0;
+}
+
+div.sphinxsidebar p {
+ color: #ffffff;
+}
+
+div.sphinxsidebar p.topless {
+ margin: 5px 10px 10px 10px;
+}
+
+div.sphinxsidebar ul {
+ margin: 10px;
+ padding: 0;
+ color: #ffffff;
+}
+
+div.sphinxsidebar a {
+ color: #98dbcc;
+}
+
+div.sphinxsidebar input {
+ border: 1px solid #98dbcc;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+
+/* -- body styles
----------------------------------------------------------- */
+
+a {
+ color: #355f7c;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+div.body p, div.body dd, div.body li {
+ text-align: justify;
+ line-height: 130%;
+}
+
+div.body h1,
+div.body h2,
+div.body h3,
+div.body h4,
+div.body h5,
+div.body h6 {
+ font-family: 'Trebuchet MS', sans-serif;
+ background-color: #f2f2f2;
+ font-weight: normal;
+ color: #20435c;
+ border-bottom: 1px solid #ccc;
+ margin: 20px -20px 10px -20px;
+ padding: 3px 0 3px 10px;
+}
+
+div.body h1 { margin-top: 0; font-size: 200%; }
+div.body h2 { font-size: 160%; }
+div.body h3 { font-size: 140%; }
+div.body h4 { font-size: 120%; }
+div.body h5 { font-size: 110%; }
+div.body h6 { font-size: 100%; }
+
+a.headerlink {
+ color: #c60f0f;
+ font-size: 0.8em;
+ padding: 0 4px 0 4px;
+ text-decoration: none;
+}
+
+a.headerlink:hover {
+ background-color: #c60f0f;
+ color: white;
+}
+
+div.body p, div.body dd, div.body li {
+ text-align: justify;
+ line-height: 130%;
+}
+
+div.admonition p.admonition-title + p {
+ display: inline;
+}
+
+div.admonition p {
+ margin-bottom: 5px;
+}
+
+div.admonition pre {
+ margin-bottom: 5px;
+}
+
+div.admonition ul, div.admonition ol {
+ margin-bottom: 5px;
+}
+
+div.note {
+ background-color: #eee;
+ border: 1px solid #ccc;
+}
+
+div.seealso {
+ background-color: #ffc;
+ border: 1px solid #ff6;
+}
+
+div.topic {
+ background-color: #eee;
+}
+
+div.warning {
+ background-color: #ffe4e4;
+ border: 1px solid #f66;
+}
+
+p.admonition-title {
+ display: inline;
+}
+
+p.admonition-title:after {
+ content: ":";
+}
+
+pre {
+ padding: 5px;
+ background-color: #eeffcc;
+ color: #333333;
+ line-height: 120%;
+ border: 1px solid #ac9;
+ border-left: none;
+ border-right: none;
+}
+
+tt {
+ background-color: #ecf0f3;
+ padding: 0 1px 0 1px;
+ font-size: 0.95em;
+}
+
+.warning tt {
+ background: #efc2c2;
+}
+
+.note tt {
+ background: #d6d6d6;
+}
=======================================
--- /dev/null
+++ /doc/build/html/_static/doctools.js Sun Jun 6 19:36:23 2010
@@ -0,0 +1,232 @@
+/// XXX: make it cross browser
+
+/**
+ * make the code below compatible with browsers without
+ * an installed firebug like debugger
+ */
+if (!window.console || !console.firebug) {
+ var names =
["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
+ window.console = {};
+ for (var i = 0; i < names.length; ++i)
+ window.console[names[i]] = function() {}
+}
+
+/**
+ * small helper function to urldecode strings
+ */
+jQuery.urldecode = function(x) {
+ return decodeURIComponent(x).replace(/\+/g, ' ');
+}
+
+/**
+ * small helper function to urlencode strings
+ */
+jQuery.urlencode = encodeURIComponent;
+
+/**
+ * This function returns the parsed url parameters of the
+ * current request. Multiple values per key are supported,
+ * it will always return arrays of strings for the value parts.
+ */
+jQuery.getQueryParameters = function(s) {
+ if (typeof s == 'undefined')
+ s = document.location.search;
+ var parts = s.substr(s.indexOf('?') + 1).split('&');
+ var result = {};
+ for (var i = 0; i < parts.length; i++) {
+ var tmp = parts[i].split('=', 2);
+ var key = jQuery.urldecode(tmp[0]);
+ var value = jQuery.urldecode(tmp[1]);
+ if (key in result)
+ result[key].push(value);
+ else
+ result[key] = [value];
+ }
+ return result;
+}
+
+/**
+ * small function to check if an array contains
+ * a given item.
+ */
+jQuery.contains = function(arr, item) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] == item)
+ return true;
+ }
+ return false;
+}
+
+/**
+ * highlight a given string on a jquery object by wrapping it in
+ * span elements with the given class name.
+ */
+jQuery.fn.highlightText = function(text, className) {
+ function highlight(node) {
+ if (node.nodeType == 3) {
+ var val = node.nodeValue;
+ var pos = val.toLowerCase().indexOf(text);
+ if (pos >= 0 && !jQuery.className.has(node.parentNode, className)) {
+ var span = document.createElement("span");
+ span.className = className;
+ span.appendChild(document.createTextNode(val.substr(pos,
text.length)));
+ node.parentNode.insertBefore(span, node.parentNode.insertBefore(
+ document.createTextNode(val.substr(pos + text.length)),
+ node.nextSibling));
+ node.nodeValue = val.substr(0, pos);
+ }
+ }
+ else if (!jQuery(node).is("button, select, textarea")) {
+ jQuery.each(node.childNodes, function() {
+ highlight(this)
+ });
+ }
+ }
+ return this.each(function() {
+ highlight(this);
+ });
+}
+
+/**
+ * Small JavaScript module for the documentation.
+ */
+var Documentation = {
+
+ init : function() {
+ this.fixFirefoxAnchorBug();
+ this.highlightSearchWords();
+ this.initModIndex();
+ },
+
+ /**
+ * i18n support
+ */
+ TRANSLATIONS : {},
+ PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; },
+ LOCALE : 'unknown',
+
+ // gettext and ngettext don't access this so that the functions
+ // can savely bound to a different name (_ = Documentation.gettext)
+ gettext : function(string) {
+ var translated = Documentation.TRANSLATIONS[string];
+ if (typeof translated == 'undefined')
+ return string;
+ return (typeof translated == 'string') ? translated : translated[0];
+ },
+
+ ngettext : function(singular, plural, n) {
+ var translated = Documentation.TRANSLATIONS[singular];
+ if (typeof translated == 'undefined')
+ return (n == 1) ? singular : plural;
+ return translated[Documentation.PLURALEXPR(n)];
+ },
+
+ addTranslations : function(catalog) {
+ for (var key in catalog.messages)
+ this.TRANSLATIONS[key] = catalog.messages[key];
+ this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr
+ ')');
+ this.LOCALE = catalog.locale;
+ },
+
+ /**
+ * add context elements like header anchor links
+ */
+ addContextElements : function() {
+ $('div[id] > :header:first').each(function() {
+ $('<a class="headerlink">\u00B6</a>').
+ attr('href', '#' + this.id).
+ attr('title', _('Permalink to this headline')).
+ appendTo(this);
+ });
+ $('dt[id]').each(function() {
+ $('<a class="headerlink">\u00B6</a>').
+ attr('href', '#' + this.id).
+ attr('title', _('Permalink to this definition')).
+ appendTo(this);
+ });
+ },
+
+ /**
+ * workaround a firefox stupidity
+ */
+ fixFirefoxAnchorBug : function() {
+ if (document.location.hash && $.browser.mozilla)
+ window.setTimeout(function() {
+ document.location.href += '';
+ }, 10);
+ },
+
+ /**
+ * highlight the search words provided in the url in the text
+ */
+ highlightSearchWords : function() {
+ var params = $.getQueryParameters();
+ var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
+ if (terms.length) {
+ var body = $('div.body');
+ window.setTimeout(function() {
+ $.each(terms, function() {
+ body.highlightText(this.toLowerCase(), 'highlight');
+ });
+ }, 10);
+ $('<li class="highlight-link"><a href="javascript:Documentation.' +
+ 'hideSearchWords()">' + _('Hide Search Matches') + '</a></li>')
+ .appendTo($('.sidebar .this-page-menu'));
+ }
+ },
+
+ /**
+ * init the modindex toggle buttons
+ */
+ initModIndex : function() {
+ var togglers = $('img.toggler').click(function() {
+ var src = $(this).attr('src');
+ var idnum = $(this).attr('id').substr(7);
+ console.log($('tr.cg-' + idnum).toggle());
+ if (src.substr(-9) == 'minus.png')
+ $(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
+ else
+ $(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
+ }).css('display', '');
+ if (DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX) {
+ togglers.click();
+ }
+ },
+
+ /**
+ * helper function to hide the search marks again
+ */
+ hideSearchWords : function() {
+ $('.sidebar .this-page-menu li.highlight-link').fadeOut(300);
+ $('span.highlight').removeClass('highlight');
+ },
+
+ /**
+ * make the url absolute
+ */
+ makeURL : function(relativeURL) {
+ return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
+ },
+
+ /**
+ * get the current relative url
+ */
+ getCurrentURL : function() {
+ var path = document.location.pathname;
+ var parts = path.split(/\//);
+ $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
+ if (this == '..')
+ parts.pop();
+ });
+ var url = parts.join('/');
+ return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
+ }
+};
+
+// quick alias for translations
+_ = Documentation.gettext;
+
+$(document).ready(function() {
+ Documentation.init();
+});
=======================================
--- /dev/null
+++ /doc/build/html/_static/file.png Sun Jun 6 19:36:23 2010
@@ -0,0 +1,12 @@
+ PNG
+
+
+IHDR óÿa bKGD ÿ ÿ ÿ 1/2 § pHYs tIME Õ
+ )¶T
+ IDAT8Ë- ±JÄ@ ¿Ir(' [ "&
+xØÙYZ Xø0 !i| _@±Ô÷ t§ ÓDÄæ Ï] ¹#¹Äx ÿjv ùç
+ Y
+ÐN a E i<<( ÌÄÉ y £µ @D|£&± `Û6(R)ë P| Zk $)5 %"ôz 1/2 Ê.Nñ A#A ba `Vs ø 3/4_3ñ
+c °,<< àä2m 1/4 Ýñþjó
+ [k ìlv¹y|!IÕ´ðþyô; ÀðvÈé " ß(R) ° a(c)? AúðÄ7 `ô ñÇ c^énôk?¸²Bg}>>TÐ ¹D#ÁÑÞ
+"R¹D1÷£ çyüE Rê* ãÝ6MJ(c)3þK_U<<t 8F~Ç IEND(R)B`
=======================================
--- /dev/null
+++ /doc/build/html/_static/jquery.js Sun Jun 6 19:36:23 2010
@@ -0,0 +1,6240 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function( window, undefined ) {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // Use the correct document accordingly with window argument (sandbox)
+ document = window.document,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // (both of which we optimize for)
+ quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
+
+ // Is it a simple selector
+ isSimple = /^.[^:#\[\.,]*$/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+
+ // Used for trimming whitespace
+ rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // Has the ready events already been bound?
+ readyBound = false,
+
+ // The functions to execute on DOM ready
+ readyList = [],
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwnProperty = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ indexOf = Array.prototype.indexOf;
+
+jQuery.fn = jQuery.prototype = {
+ init: function( selector, context ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = "body";
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ match = quickExpr.exec( selector );
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ doc = (context ? context.ownerDocument || context : document);
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = buildFragment( [ match[1] ], [ doc ] );
+ selector = (ret.cacheable ? ret.fragment.cloneNode(true) :
ret.fragment).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $("#id")
+ } else {
+ elem = document.getElementById( match[2] );
+
+ if ( elem ) {
+ // Handle the case where IE and Opera return items
+ // by name instead of ID
+ if ( elem.id !== match[2] ) {
+ return rootjQuery.find( selector );
+ }
+
+ // Otherwise, we inject the element directly into the jQuery object
+ this.length = 1;
+ this[0] = elem;
+ }
+
+ this.context = document;
+ this.selector = selector;
+ return this;
+ }
+
+ // HANDLE: $("TAG")
+ } else if ( !context && /^\w+$/.test( selector ) ) {
+ this.selector = selector;
+ this.context = document;
+ selector = document.getElementsByTagName( selector );
+ return jQuery.merge( this, selector );
+
+ // HANDLE: $(expr, $(...))
+ } else if ( !context || context.jquery ) {
+ return (context || rootjQuery).find( selector );
+
+ // HANDLE: $(expr, context)
+ // (which is just equivalent to: $(context).find(expr)
+ } else {
+ return jQuery( context ).find( selector );
+ }
+
+ // HANDLE: $(function)
+ // Shortcut for document ready
+ } else if ( jQuery.isFunction( selector ) ) {
+ return rootjQuery.ready( selector );
+ }
+
+ if (selector.selector !== undefined) {
+ this.selector = selector.selector;
+ this.context = selector.context;
+ }
+
+ return jQuery.makeArray( selector, this );
+ },
+
+ // Start with an empty selector
+ selector: "",
+
+ // The current version of jQuery being used
+ jquery: "1.4.2",
+
+ // The default length of a jQuery object is 0
+ length: 0,
+
+ // The number of elements contained in the matched element set
+ size: function() {
+ return this.length;
+ },
+
+ toArray: function() {
+ return slice.call( this, 0 );
+ },
+
+ // Get the Nth element in the matched element set OR
+ // Get the whole matched element set as a clean array
+ get: function( num ) {
+ return num == null ?
+
+ // Return a 'clean' array
+ this.toArray() :
+
+ // Return just the object
+ ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
+ },
+
+ // Take an array of elements and push it onto the stack
+ // (returning the new matched element set)
+ pushStack: function( elems, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = jQuery();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + (this.selector ? " " : "") + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // Return the newly-formed element set
+ return ret;
+ },
+
+ // Execute a callback for every element in the matched set.
+ // (You can seed the arguments with an array of args, but this is
+ // only used internally.)
+ each: function( callback, args ) {
+ return jQuery.each( this, callback, args );
+ },
+
+ ready: function( fn ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // If the DOM is already ready
+ if ( jQuery.isReady ) {
+ // Execute the function immediately
+ fn.call( document, jQuery );
+
+ // Otherwise, remember the function for later
+ } else if ( readyList ) {
+ // Add the function to the wait list
+ readyList.push( fn );
+ }
+
+ return this;
+ },
+
+ eq: function( i ) {
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, +i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ map: function( callback ) {
+ return this.pushStack( jQuery.map(this, function( elem, i ) {
+ return callback.call( elem, i, elem );
+ }));
+ },
+
+ end: function() {
+ return this.prevObject || jQuery(null);
+ },
+
+ // For internal use only.
+ // Behaves like an Array's method, not like a jQuery method.
+ push: push,
+ sort: [].sort,
+ splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+ // copy reference to target object
+ var target = arguments[0] || {}, i = 1, length = arguments.length, deep =
false, options, name, src, copy;
+
+ // Handle a deep copy situation
+ if ( typeof target === "boolean" ) {
+ deep = target;
+ target = arguments[1] || {};
+ // skip the boolean and the target
+ i = 2;
+ }
+
+ // Handle case when target is a string or something (possible in deep
copy)
+ if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+ target = {};
+ }
+
+ // extend jQuery itself if only one argument is passed
+ if ( length === i ) {
+ target = this;
+ --i;
+ }
+
+ for ( ; i < length; i++ ) {
+ // Only deal with non-null/undefined values
+ if ( (options = arguments[ i ]) != null ) {
+ // Extend the base object
+ for ( name in options ) {
+ src = target[ name ];
+ copy = options[ name ];
+
+ // Prevent never-ending loop
+ if ( target === copy ) {
+ continue;
+ }
+
+ // Recurse if we're merging object literal values or arrays
+ if ( deep && copy && ( jQuery.isPlainObject(copy) ||
jQuery.isArray(copy) ) ) {
+ var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src)
) ? src
+ : jQuery.isArray(copy) ? [] : {};
+
+ // Never move original objects, clone them
+ target[ name ] = jQuery.extend( deep, clone, copy );
+
+ // Don't bring in undefined values
+ } else if ( copy !== undefined ) {
+ target[ name ] = copy;
+ }
+ }
+ }
+ }
+
+ // Return the modified object
+ return target;
+};
+
+jQuery.extend({
+ noConflict: function( deep ) {
+ window.$ = _$;
+
+ if ( deep ) {
+ window.jQuery = _jQuery;
+ }
+
+ return jQuery;
+ },
+
+ // Is the DOM ready to be used? Set to true once it occurs.
+ isReady: false,
+
+ // Handle when the DOM is ready
+ ready: function() {
+ // Make sure that the DOM is not already loaded
+ if ( !jQuery.isReady ) {
+ // Make sure body exists, at least, in case IE gets a little
overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 13 );
+ }
+
+ // Remember that the DOM is ready
+ jQuery.isReady = true;
+
+ // If there are functions bound, to execute
+ if ( readyList ) {
+ // Execute all of them
+ var fn, i = 0;
+ while ( (fn = readyList[ i++ ]) ) {
+ fn.call( document, jQuery );
+ }
+
+ // Reset the list of functions
+ readyList = null;
+ }
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyBound ) {
+ return;
+ }
+
+ readyBound = true;
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ return jQuery.ready();
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false
);
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent("onreadystatechange", DOMContentLoaded);
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // See test/unit/core.js for details concerning isFunction.
+ // Since version 1.3, DOM methods and functions like alert
+ // aren't supported. They return false on IE (#2968).
+ isFunction: function( obj ) {
+ return toString.call(obj) === "[object Function]";
+ },
+
+ isArray: function( obj ) {
+ return toString.call(obj) === "[object Array]";
+ },
+
+ isPlainObject: function( obj ) {
+ // Must be an Object.
+ // Because of IE, we also have to check the presence of the constructor
property.
+ // Make sure that DOM nodes and window objects don't pass through, as
well
+ if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType ||
obj.setInterval ) {
+ return false;
+ }
+
+ // Not own constructor property must be Object
+ if ( obj.constructor
+ && !hasOwnProperty.call(obj, "constructor")
+ && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
+ return false;
+ }
+
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+
+ var key;
+ for ( key in obj ) {}
+
+ return key === undefined || hasOwnProperty.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw msg;
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Make sure the incoming data is actual JSON
+ // Logic borrowed from http://json.org/json2.js
+ if ( /^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|
u[0-9a-fA-F]{4})/g, "@")
+ .replace(/"[^"\\\n\r]*"|true|false|null|
-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
+ .replace(/(?:^|:|,)(?:\s*\[)+/g, "")) ) {
+
+ // Try to use the native JSON parser first
+ return window.JSON && window.JSON.parse ?
+ window.JSON.parse( data ) :
+ (new Function("return " + data))();
+
+ } else {
+ jQuery.error( "Invalid JSON: " + data );
+ }
+ },
+
+ noop: function() {},
+
+ // Evalulates a script in a global context
+ globalEval: function( data ) {
+ if ( data && rnotwhite.test(data) ) {
+ // Inspired by code by Andrea Giammarchi
+ //
http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
+ var head = document.getElementsByTagName("head")[0] ||
document.documentElement,
+ script = document.createElement("script");
+
+ script.type = "text/javascript";
+
+ if ( jQuery.support.scriptEval ) {
+ script.appendChild( document.createTextNode( data ) );
+ } else {
+ script.text = data;
+ }
+
+ // Use insertBefore instead of appendChild to circumvent an IE6 bug.
+ // This arises when a base node is used (#2709).
+ head.insertBefore( script, head.firstChild );
+ head.removeChild( script );
+ }
+ },
+
+ nodeName: function( elem, name ) {
+ return elem.nodeName && elem.nodeName.toUpperCase() ===
name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction(object);
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false
) {
+ break;
+ }
+ }
+ } else {
+ for ( var value = object[0];
+ i < length && callback.call( value, i, value ) !== false; value =
object[++i] ) {}
+ }
+ }
+
+ return object;
+ },
+
+ trim: function( text ) {
+ return (text || "").replace( rtrim, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // The extra typeof function check is to prevent crashes
+ // in Safari 2 (See: #3039)
+ if ( array.length == null || typeof array === "string" ||
jQuery.isFunction(array) || (typeof array !== "function" &&
array.setInterval) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length, j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; j < l; j++ ) {
+ first[ i++ ] = second[ j ];
+ }
+
+ } else {
+ while ( second[j] !== undefined ) {
+ first[ i++ ] = second[ j++ ];
+ }
+ }
+
+ first.length = i;
+
+ return first;
+ },
+
+ grep: function( elems, callback, inv ) {
+ var ret = [];
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ if ( !inv !== !callback( elems[ i ], i ) ) {
+ ret.push( elems[ i ] );
+ }
+ }
+
+ return ret;
+ },
+
+ // arg is for internal usage only
+ map: function( elems, callback, arg ) {
+ var ret = [], value;
+
+ // Go through the array, translating each of the items to their
+ // new value (or values).
+ for ( var i = 0, length = elems.length; i < length; i++ ) {
+ value = callback( elems[ i ], i, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+
+ return ret.concat.apply( [], ret );
+ },
+
+ // A global GUID counter for objects
+ guid: 1,
+
+ proxy: function( fn, proxy, thisObject ) {
+ if ( arguments.length === 2 ) {
+ if ( typeof proxy === "string" ) {
+ thisObject = fn;
+ fn = thisObject[ proxy ];
+ proxy = undefined;
+
+ } else if ( proxy && !jQuery.isFunction( proxy ) ) {
+ thisObject = proxy;
+ proxy = undefined;
+ }
+ }
+
+ if ( !proxy && fn ) {
+ proxy = function() {
+ return fn.apply( thisObject || this, arguments );
+ };
+ }
+
+ // Set the guid of unique handler to the same of original handler, so it
can be removed
+ if ( fn ) {
+ proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+ }
+
+ // So proxy can be declared as an argument
+ return proxy;
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+ /(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
+ /(msie) ([\w.]+)/.exec( ua ) ||
+ !/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) |
|
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ browser: {}
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+if ( indexOf ) {
+ jQuery.inArray = function( elem, array ) {
+ return indexOf.call( array, elem );
+ };
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded,
false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous
(ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch( error ) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+function evalScript( i, elem ) {
+ if ( elem.src ) {
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+ } else {
+ jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || ""
);
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+}
+
+// Mutifunctional method to get and set values to a collection
+// The value/s can be optionally by executed if its a function
+function access( elems, key, value, exec, fn, pass ) {
+ var length = elems.length;
+
+ // Setting many attributes
+ if ( typeof key === "object" ) {
+ for ( var k in key ) {
+ access( elems, k, key[k], exec, fn, value );
+ }
+ return elems;
+ }
+
+ // Setting one attribute
+ if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = !pass && exec && jQuery.isFunction(value);
+
+ for ( var i = 0; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key )
) : value, pass );
+ }
+
+ return elems;
+ }
+
+ // Getting an attribute
+ return length ? fn( elems[0], key ) : undefined;
+}
+
+function now() {
+ return (new Date).getTime();
+}
+(function() {
+
+ jQuery.support = {};
+
+ var root = document.documentElement,
+ script = document.createElement("script"),
+ div = document.createElement("div"),
+ id = "script" + now();
+
+ div.style.display = "none";
+ div.innerHTML = " <link/><table></table><a href='/a'
style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+ var all = div.getElementsByTagName("*"),
+ a = div.getElementsByTagName("a")[0];
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return;
+ }
+
+ jQuery.support = {
+ // IE strips leading whitespace when .innerHTML is used
+ leadingWhitespace: div.firstChild.nodeType === 3,
+
+ // Make sure that tbody elements aren't automatically inserted
+ // IE will insert them into empty tables
+ tbody: !div.getElementsByTagName("tbody").length,
+
+ // Make sure that link elements get serialized correctly by innerHTML
+ // This requires a wrapper element in IE
+ htmlSerialize: !!div.getElementsByTagName("link").length,
+
+ // Get the style information from getAttribute
+ // (IE uses .cssText insted)
+ style: /red/.test( a.getAttribute("style") ),
+
+ // Make sure that URLs aren't manipulated
+ // (IE normalizes it by default)
+ hrefNormalized: a.getAttribute("href") === "/a",
+
+ // Make sure that element opacity exists
+ // (IE uses filter instead)
+ // Use a regex to work around a WebKit issue. See #5145
+ opacity: /^0.55$/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: div.getElementsByTagName("input")[0].value === "on",
+
+ // Make sure that a selected-by-default option has a working selected
property.
+ // (WebKit defaults to false instead of true, IE too, if it's in an
optgroup)
+ optSelected: document.createElement("select").appendChild(
document.createElement("option") ).selected,
+
+ parentNode: div.removeChild( div.appendChild(
document.createElement("div") ) ).parentNode === null,
+
+ // Will be defined later
+ deleteExpando: true,
+ checkClone: false,
+ scriptEval: false,
+ noCloneEvent: true,
+ boxModel: null
+ };
+
+ script.type = "text/javascript";
+ try {
+ script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
+ } catch(e) {}
+
+ root.insertBefore( script, root.firstChild );
+
+ // Make sure that the execution of code works by injecting a script
+ // tag with appendChild/createTextNode
+ // (IE doesn't support this, fails, and uses .text instead)
+ if ( window[ id ] ) {
+ jQuery.support.scriptEval = true;
+ delete window[ id ];
+ }
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete script.test;
+
+ } catch(e) {
+ jQuery.support.deleteExpando = false;
+ }
+
+ root.removeChild( script );
+
+ if ( div.attachEvent && div.fireEvent ) {
+ div.attachEvent("onclick", function click() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ jQuery.support.noCloneEvent = false;
+ div.detachEvent("onclick", click);
+ });
+ div.cloneNode(true).fireEvent("onclick");
+ }
+
+ div = document.createElement("div");
+ div.innerHTML = "<input type='radio' name='radiotest'
checked='checked'/>";
+
+ var fragment = document.createDocumentFragment();
+ fragment.appendChild( div.firstChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ jQuery.support.checkClone =
fragment.cloneNode(true).cloneNode(true).lastChild.checked;
+
+ // Figure out if the W3C box model works as expected
+ // document.body must exist before we can do this
+ jQuery(function() {
+ var div = document.createElement("div");
+ div.style.width = div.style.paddingLeft = "1px";
+
+ document.body.appendChild( div );
+ jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
+ document.body.removeChild( div ).style.display = 'none';
+
+ div = null;
+ });
+
+ // Technique from Juriy Zaytsev
+ //
http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
+ var eventSupported = function( eventName ) {
+ var el = document.createElement("div");
+ eventName = "on" + eventName;
+
+ var isSupported = (eventName in el);
+ if ( !isSupported ) {
+ el.setAttribute(eventName, "return;");
+ isSupported = typeof el[eventName] === "function";
+ }
+ el = null;
+
+ return isSupported;
+ };
+
+ jQuery.support.submitBubbles = eventSupported("submit");
+ jQuery.support.changeBubbles = eventSupported("change");
+
+ // release memory in IE
+ root = script = div = all = a = null;
+})();
+
+jQuery.props = {
+ "for": "htmlFor",
+ "class": "className",
+ readonly: "readOnly",
+ maxlength: "maxLength",
+ cellspacing: "cellSpacing",
+ rowspan: "rowSpan",
+ colspan: "colSpan",
+ tabindex: "tabIndex",
+ usemap: "useMap",
+ frameborder: "frameBorder"
+};
+var expando = "jQuery" + now(), uuid = 0, windowData = {};
+
+jQuery.extend({
+ cache: {},
+
+ expando:expando,
+
+ // The following elements throw uncatchable exceptions if you
+ // attempt to add expando properties to them.
+ noData: {
+ "embed": true,
+ "object": true,
+ "applet": true
***The diff for this file has been truncated for email.***
=======================================
--- /dev/null
+++ /doc/build/html/_static/minus.png Sun Jun 6 19:36:23 2010
@@ -0,0 +1,8 @@
+ PNG
+
+
+IHDR &Îàq
pHYs tIME × <(R)8å tEXtComment öÌ ¿ RIDAT Óc<sæ ^ÀÂÀÀ ¢¢ Uîß¿ ÷îÝc E ab
<<` P rG
+E¨8~ü8Ü
+LLLÈn¢ ;Ð| Æea``¸wï
+
+3 Ð= U³[ . IEND(R)B`
=======================================
--- /dev/null
+++ /doc/build/html/_static/plus.png Sun Jun 6 19:36:23 2010
@@ -0,0 +1,8 @@
+ PNG
+
+
+IHDR &Îàq pHYs tIME ×
+1 l9 tEXtComment öÌ ¿ RIDAT Óc<sæ ^ÀÂÀÀ ¢¢ Uîß¿ ÷îÝcB µ´´D ab <<`Á4
+Î>zô(BÅñãÇáÒpö¿ ÿ¨è ip>> ¹P ÷îÝÃc
+· ¸
+|¶ IEND(R)B`
=======================================
--- /dev/null
+++ /doc/build/html/_static/pygments.css Sun Jun 6 19:36:23 2010
@@ -0,0 +1,61 @@
+.hll { background-color: #ffffcc }
+.c { color: #408090; font-style: italic } /* Comment */
+.err { border: 1px solid #FF0000 } /* Error */
+.k { color: #007020; font-weight: bold } /* Keyword */
+.o { color: #666666 } /* Operator */
+.cm { color: #408090; font-style: italic } /* Comment.Multiline */
+.cp { color: #007020 } /* Comment.Preproc */
+.c1 { color: #408090; font-style: italic } /* Comment.Single */
+.cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
+.gd { color: #A00000 } /* Generic.Deleted */
+.ge { font-style: italic } /* Generic.Emph */
+.gr { color: #FF0000 } /* Generic.Error */
+.gh { color: #000080; font-weight: bold } /* Generic.Heading */
+.gi { color: #00A000 } /* Generic.Inserted */
+.go { color: #303030 } /* Generic.Output */
+.gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
+.gs { font-weight: bold } /* Generic.Strong */
+.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
+.gt { color: #0040D0 } /* Generic.Traceback */
+.kc { color: #007020; font-weight: bold } /* Keyword.Constant */
+.kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
+.kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
+.kp { color: #007020 } /* Keyword.Pseudo */
+.kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
+.kt { color: #902000 } /* Keyword.Type */
+.m { color: #208050 } /* Literal.Number */
+.s { color: #4070a0 } /* Literal.String */
+.na { color: #4070a0 } /* Name.Attribute */
+.nb { color: #007020 } /* Name.Builtin */
+.nc { color: #0e84b5; font-weight: bold } /* Name.Class */
+.no { color: #60add5 } /* Name.Constant */
+.nd { color: #555555; font-weight: bold } /* Name.Decorator */
+.ni { color: #d55537; font-weight: bold } /* Name.Entity */
+.ne { color: #007020 } /* Name.Exception */
+.nf { color: #06287e } /* Name.Function */
+.nl { color: #002070; font-weight: bold } /* Name.Label */
+.nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
+.nt { color: #062873; font-weight: bold } /* Name.Tag */
+.nv { color: #bb60d5 } /* Name.Variable */
+.ow { color: #007020; font-weight: bold } /* Operator.Word */
+.w { color: #bbbbbb } /* Text.Whitespace */
+.mf { color: #208050 } /* Literal.Number.Float */
+.mh { color: #208050 } /* Literal.Number.Hex */
+.mi { color: #208050 } /* Literal.Number.Integer */
+.mo { color: #208050 } /* Literal.Number.Oct */
+.sb { color: #4070a0 } /* Literal.String.Backtick */
+.sc { color: #4070a0 } /* Literal.String.Char */
+.sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
+.s2 { color: #4070a0 } /* Literal.String.Double */
+.se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
+.sh { color: #4070a0 } /* Literal.String.Heredoc */
+.si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
+.sx { color: #c65d09 } /* Literal.String.Other */
+.sr { color: #235388 } /* Literal.String.Regex */
+.s1 { color: #4070a0 } /* Literal.String.Single */
+.ss { color: #517918 } /* Literal.String.Symbol */
+.bp { color: #007020 } /* Name.Builtin.Pseudo */
+.vc { color: #bb60d5 } /* Name.Variable.Class */
+.vg { color: #bb60d5 } /* Name.Variable.Global */
+.vi { color: #bb60d5 } /* Name.Variable.Instance */
+.il { color: #208050 } /* Literal.Number.Integer.Long */
=======================================
--- /dev/null
+++ /doc/build/html/_static/searchtools.js Sun Jun 6 19:36:23 2010
@@ -0,0 +1,467 @@
+/**
+ * helper function to return a node containing the
+ * search summary for a given text. keywords is a list
+ * of stemmed words, hlwords is the list of normal, unstemmed
+ * words. the first one is used to find the occurance, the
+ * latter for highlighting it.
+ */
+
+jQuery.makeSearchSummary = function(text, keywords, hlwords) {
+ var textLower = text.toLowerCase();
+ var start = 0;
+ $.each(keywords, function() {
+ var i = textLower.indexOf(this.toLowerCase());
+ if (i > -1)
+ start = i;
+ });
+ start = Math.max(start - 120, 0);
+ var excerpt = ((start > 0) ? '...' : '') +
+ $.trim(text.substr(start, 240)) +
+ ((start + 240 - text.length) ? '...' : '');
+ var rv = $('<div class="context"></div>').text(excerpt);
+ $.each(hlwords, function() {
+ rv = rv.highlightText(this, 'highlight');
+ });
+ return rv;
+}
+
+/**
+ * Porter Stemmer
+ */
+var PorterStemmer = function() {
+
+ var step2list = {
+ ational: 'ate',
+ tional: 'tion',
+ enci: 'ence',
+ anci: 'ance',
+ izer: 'ize',
+ bli: 'ble',
+ alli: 'al',
+ entli: 'ent',
+ eli: 'e',
+ ousli: 'ous',
+ ization: 'ize',
+ ation: 'ate',
+ ator: 'ate',
+ alism: 'al',
+ iveness: 'ive',
+ fulness: 'ful',
+ ousness: 'ous',
+ aliti: 'al',
+ iviti: 'ive',
+ biliti: 'ble',
+ logi: 'log'
+ };
+
+ var step3list = {
+ icate: 'ic',
+ ative: '',
+ alize: 'al',
+ iciti: 'ic',
+ ical: 'ic',
+ ful: '',
+ ness: ''
+ };
+
+ var c = "[^aeiou]"; // consonant
+ var v = "[aeiouy]"; // vowel
+ var C = c + "[^aeiouy]*"; // consonant sequence
+ var V = v + "[aeiou]*"; // vowel sequence
+
+ var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is
m>0
+ var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is
m=1
+ var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC...
is m>1
+ var s_v = "^(" + C + ")?" + v; // vowel in stem
+
+ this.stemWord = function (w) {
+ var stem;
+ var suffix;
+ var firstch;
+ var origword = w;
+
+ if (w.length < 3)
+ return w;
+
+ var re;
+ var re2;
+ var re3;
+ var re4;
+
+ firstch = w.substr(0,1);
+ if (firstch == "y")
+ w = firstch.toUpperCase() + w.substr(1);
+
+ // Step 1a
+ re = /^(.+?)(ss|i)es$/;
+ re2 = /^(.+?)([^s])s$/;
+
+ if (re.test(w))
+ w = w.replace(re,"$1$2");
+ else if (re2.test(w))
+ w = w.replace(re2,"$1$2");
+
+ // Step 1b
+ re = /^(.+?)eed$/;
+ re2 = /^(.+?)(ed|ing)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ re = new RegExp(mgr0);
+ if (re.test(fp[1])) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1];
+ re2 = new RegExp(s_v);
+ if (re2.test(stem)) {
+ w = stem;
+ re2 = /(at|bl|iz)$/;
+ re3 = new RegExp("([^aeiouylsz])\\1$");
+ re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re2.test(w))
+ w = w + "e";
+ else if (re3.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+ else if (re4.test(w))
+ w = w + "e";
+ }
+ }
+
+ // Step 1c
+ re = /^(.+?)y$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(s_v);
+ if (re.test(stem))
+ w = stem + "i";
+ }
+
+ // Step 2
+ re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|
ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step2list[suffix];
+ }
+
+ // Step 3
+ re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ suffix = fp[2];
+ re = new RegExp(mgr0);
+ if (re.test(stem))
+ w = stem + step3list[suffix];
+ }
+
+ // Step 4
+ re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|
ate|iti|ous|ive|ize)$/;
+ re2 = /^(.+?)(s|t)(ion)$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ if (re.test(stem))
+ w = stem;
+ }
+ else if (re2.test(w)) {
+ var fp = re2.exec(w);
+ stem = fp[1] + fp[2];
+ re2 = new RegExp(mgr1);
+ if (re2.test(stem))
+ w = stem;
+ }
+
+ // Step 5
+ re = /^(.+?)e$/;
+ if (re.test(w)) {
+ var fp = re.exec(w);
+ stem = fp[1];
+ re = new RegExp(mgr1);
+ re2 = new RegExp(meq1);
+ re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+ if (re.test(stem) || (re2.test(stem) && !(re3.test(stem))))
+ w = stem;
+ }
+ re = /ll$/;
+ re2 = new RegExp(mgr1);
+ if (re.test(w) && re2.test(w)) {
+ re = /.$/;
+ w = w.replace(re,"");
+ }
+
+ // and turn initial Y back to y
+ if (firstch == "y")
+ w = firstch.toLowerCase() + w.substr(1);
+ return w;
+ }
+}
+
+
+/**
+ * Search Module
+ */
+var Search = {
+
+ _index : null,
+ _queued_query : null,
+ _pulse_status : -1,
+
+ init : function() {
+ var params = $.getQueryParameters();
+ if (params.q) {
+ var query = params.q[0];
+ $('input[name="q"]')[0].value = query;
+ this.performSearch(query);
+ }
+ },
+
+ /**
+ * Sets the index
+ */
+ setIndex : function(index) {
+ var q;
+ this._index = index;
+ if ((q = this._queued_query) !== null) {
+ this._queued_query = null;
+ Search.query(q);
+ }
+ },
+
+ hasIndex : function() {
+ return this._index !== null;
+ },
+
+ deferQuery : function(query) {
+ this._queued_query = query;
+ },
+
+ stopPulse : function() {
+ this._pulse_status = 0;
+ },
+
+ startPulse : function() {
+ if (this._pulse_status >= 0)
+ return;
+ function pulse() {
+ Search._pulse_status = (Search._pulse_status + 1) % 4;
+ var dotString = '';
+ for (var i = 0; i < Search._pulse_status; i++)
+ dotString += '.';
+ Search.dots.text(dotString);
+ if (Search._pulse_status > -1)
+ window.setTimeout(pulse, 500);
+ };
+ pulse();
+ },
+
+ /**
+ * perform a search for something
+ */
+ performSearch : function(query) {
+ // create the required interface elements
+ this.out = $('#search-results');
+ this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
+ this.dots = $('<span></span>').appendTo(this.title);
+ this.status = $('<p style="display: none"></p>').appendTo(this.out);
+ this.output = $('<ul class="search"/>').appendTo(this.out);
+
+ $('#search-progress').text(_('Preparing search...'));
+ this.startPulse();
+
+ // index already loaded, the browser was quick!
+ if (this.hasIndex())
+ this.query(query);
+ else
+ this.deferQuery(query);
+ },
+
+ query : function(query) {
+ // stem the searchterms and add them to the
+ // correct list
+ var stemmer = new PorterStemmer();
+ var searchterms = [];
+ var excluded = [];
+ var hlterms = [];
+ var tmp = query.split(/\s+/);
+ var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
+ for (var i = 0; i < tmp.length; i++) {
+ // stem the word
+ var word = stemmer.stemWord(tmp[i]).toLowerCase();
+ // select the correct list
+ if (word[0] == '-') {
+ var toAppend = excluded;
+ word = word.substr(1);
+ }
+ else {
+ var toAppend = searchterms;
+ hlterms.push(tmp[i].toLowerCase());
+ }
+ // only add if not already in the list
+ if (!$.contains(toAppend, word))
+ toAppend.push(word);
+ };
+ var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
+
+ console.debug('SEARCH: searching for:');
+ console.info('required: ', searchterms);
+ console.info('excluded: ', excluded);
+
+ // prepare search
+ var filenames = this._index.filenames;
+ var titles = this._index.titles;
+ var terms = this._index.terms;
+ var descrefs = this._index.descrefs;
+ var modules = this._index.modules;
+ var desctypes = this._index.desctypes;
+ var fileMap = {};
+ var files = null;
+ var objectResults = [];
+ var regularResults = [];
+ $('#search-progress').empty();
+
+ // lookup as object
+ if (object != null) {
+ for (var module in modules) {
+ if (module.indexOf(object) > -1) {
+ fn = modules[module];
+ descr = _('module, in ') + titles[fn];
+ objectResults.push([filenames[fn], module, '#module-'+module,
descr]);
+ }
+ }
+ for (var prefix in descrefs) {
+ for (var name in descrefs[prefix]) {
+ var fullname = (prefix ? prefix + '.' : '') + name;
+ if (fullname.toLowerCase().indexOf(object) > -1) {
+ match = descrefs[prefix][name];
+ descr = desctypes[match[1]] + _(', in ') + titles[match[0]];
+ objectResults.push([filenames[match[0]],
fullname, '#'+fullname, descr]);
+ }
+ }
+ }
+ }
+
+ // sort results descending
+ objectResults.sort(function(a, b) {
+ return (a[1] > b[1]) ? -1 : ((a[1] < b[1]) ? 1 : 0);
+ });
+
+
+ // perform the search on the required terms
+ for (var i = 0; i < searchterms.length; i++) {
+ var word = searchterms[i];
+ // no match but word was a required one
+ if ((files = terms[word]) == null)
+ break;
+ if (files.length == undefined) {
+ files = [files];
+ }
+ // create the mapping
+ for (var j = 0; j < files.length; j++) {
+ var file = files[j];
+ if (file in fileMap)
+ fileMap[file].push(word);
+ else
+ fileMap[file] = [word];
+ }
+ }
+
+ // now check if the files don't contain excluded terms
+ for (var file in fileMap) {
+ var valid = true;
+
+ // check if all requirements are matched
+ if (fileMap[file].length != searchterms.length)
+ continue;
+
+ // ensure that none of the excluded terms is in the
+ // search result.
+ for (var i = 0; i < excluded.length; i++) {
+ if (terms[excluded[i]] == file ||
+ $.contains(terms[excluded[i]] || [], file)) {
+ valid = false;
+ break;
+ }
+ }
+
+ // if we have still a valid result we can add it
+ // to the result list
+ if (valid)
+ regularResults.push([filenames[file], titles[file], '', null]);
+ }
+
+ // delete unused variables in order to not waste
+ // memory until list is retrieved completely
+ delete filenames, titles, terms;
+
+ // now sort the regular results descending by title
+ regularResults.sort(function(a, b) {
+ var left = a[1].toLowerCase();
+ var right = b[1].toLowerCase();
+ return (left > right) ? -1 : ((left < right) ? 1 : 0);
+ });
+
+ // combine both
+ var results = regularResults.concat(objectResults);
+
+ // print the results
+ var resultCount = results.length;
+ function displayNextItem() {
+ // results left, load the summary and display it
+ if (results.length) {
+ var item = results.pop();
+ var listItem = $('<li style="display:none"></li>');
+ listItem.append($('<a/>').attr(
+ 'href',
+ item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
+ highlightstring + item[2]).html(item[1]));
+ if (item[3]) {
+ listItem.append($('<span> (' + item[3] + ')</span>'));
+ Search.output.append(listItem);
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
+ } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
+ $.get('_sources/' + item[0] + '.txt', function(data) {
+ listItem.append($.makeSearchSummary(data, searchterms,
hlterms));
+ Search.output.append(listItem);
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
+ });
+ } else {
+ // no source available, just display title
+ Search.output.append(listItem);
+ listItem.slideDown(5, function() {
+ displayNextItem();
+ });
+ }
+ }
+ // search finished, update title and status message
+ else {
+ Search.stopPulse();
+ Search.title.text(_('Search Results'));
+ if (!resultCount)
+ Search.status.text(_('Your search did not match any documents.
Please make sure that all words are spelled correctly and that you\'ve
selected enough categories.'));
+ else
+ Search.status.text(_('Search finished, found %s page(s)
matching the search query.').replace('%s', resultCount));
+ Search.status.fadeIn(500);
+ }
+ }
+ displayNextItem();
+ }
+}
+
+$(document).ready(function() {
+ Search.init();
+});
=======================================
--- /dev/null
+++ /doc/build/html/colisiones.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,166 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Colisiones &mdash; sbfury v0.1 documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ <link rel="next" title="Stage" href="stage.html" />
+ <link rel="prev" title="Escenas" href="escenas.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li class="right" >
+ <a href="stage.html" title="Stage"
+ accesskey="N">siguiente</a> |</li>
+ <li class="right" >
+ <a href="escenas.html" title="Escenas"
+ accesskey="P">anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="colisiones">
+<h1>Colisiones<a class="headerlink" href="#colisiones" title="Enlazar
permanentemente con este título">¶</a></h1>
+<p>Durante el juego uno puede golpear a los enemigos y
+a su vez los enemigos nos pueden golpear. A este
+comportamiento se lo denomina colisiones. Y son las
+únicas interacciones entre personajes que existen.</p>
+<img alt="_images/collision_debug_on.png"
src="_images/collision_debug_on.png" />
+<div class="section" id="collisionmanager">
+<h2>CollisionManager<a class="headerlink" href="#collisionmanager"
title="Enlazar permanentemente con este título">¶</a></h2>
+<p>Hay una instancia de este objeto dentro de <tt class="docutils
literal"><span class="pre">Stage</span></tt>, que
+a su vez es parte de <tt class="docutils literal"><span
class="pre">Game</span></tt>.</p>
+<p><tt class="docutils literal"><span
class="pre">CollisionManager</span></tt> se encarga de detectar si los
personajes
+se estan golpeando o no. Para ello tiene dos listas de personajes,
+una se utiliza para el protagonista y otra para los enemigos.</p>
+</div>
+<div class="section" id="como-se-genera-un-colision">
+<h2>¿Como se genera un colision?<a class="headerlink"
href="#como-se-genera-un-colision" title="Enlazar permanentemente con este
título">¶</a></h2>
+<p>El objeto <tt class="docutils literal"><span
class="pre">CollisionManager</span></tt> en realidad se actualiza todo
+el tiempo buscando atributos en los personajes para determinar
+si existen colisiones o no.</p>
+<p>Cuando un objeto quiere emitir una colisión tienen que pasar
+dos cosas. Una es que el personaje esté en una de
+las listas del <tt class="docutils literal"><span
class="pre">CollisionManager</span></tt>, cosa que se realiza
+con frecuencia cuando se genera el objeto:</p>
+<div class="highlight-python"><pre>new_enemy = EnemyExample()...
+self.stage.collision_manager.add_enemy(new_enemy)</pre>
+</div>
+<p>Lo segundo que tiene que hacer el personaje para emitir una
+colisión es llamar al método <tt class="docutils literal"><span
class="pre">set_collision</span></tt> de la clase
+<tt class="docutils literal"><span class="pre">Sprite</span></tt>:</p>
+<dl class="method">
+<dt id="sprite.Sprite.set_collision">
+<tt class="descclassname">Sprite.</tt><tt
class="descname">set_collision</tt><big>(</big><em>rect</em>,
<em>force=1</em><big>)</big><a class="headerlink"
href="#sprite.Sprite.set_collision" title="Enlazar permanentemente con esta
definición">¶</a></dt>
+<dd><p>Define un area de colision para emitir una colisión.</p>
+<dl class="docutils">
+<dt><cite>rect</cite>: tuple</dt>
+<dd>El area de colisión, relativa a donde se encuentra el personaje.</dd>
+<dt><cite>force</cite>: int</dt>
+<dd>Fuerza que imprime la colisión, puede ser 1, 2, 3 o 4 (como
máximo).</dd>
+</dl>
+</dd></dl>
+
+<p>Este metodo produce un rectángulo que el <tt class="docutils
literal"><span class="pre">CollisionManager</span></tt>
+va a detectar y con eso va a ver si existe un colisión con
+alguien mas.</p>
+<div class="admonition note">
+<p class="first admonition-title">Nota</p>
+<p class="last">Si quieres que los rectangulos de colision se vean
+en pantalla tienes que habilitar la variable <tt class="docutils
literal"><span class="pre">DEBUG</span></tt> en
+el archivo <tt class="docutils literal"><span
class="pre">config.py</span></tt></p>
+</div>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Contenidos</a></h3>
+ <ul>
+<li><a class="reference external" href="#">Colisiones</a><ul>
+<li><a class="reference external"
href="#collisionmanager">CollisionManager</a></li>
+<li><a class="reference external" href="#como-se-genera-un-colision">¿Como
se genera un colision?</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Tema anterior</h4>
+ <p class="topless"><a href="escenas.html"
+ title="Capítulo anterior">Escenas</a></p>
+ <h4>Próximo tema</h4>
+ <p class="topless"><a href="stage.html"
+ title="Próximo capítulo">Stage</a></p>
+ <h3>Esta página</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/colisiones.txt"
+ rel="nofollow">Enseñar el código</a></li>
+ </ul>
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li class="right" >
+ <a href="stage.html" title="Stage"
+ >siguiente</a> |</li>
+ <li class="right" >
+ <a href="escenas.html" title="Escenas"
+ >anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/director.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,113 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>El objeto Director &mdash; sbfury v0.1 documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ <link rel="next" title="Escenas" href="escenas.html" />
+ <link rel="prev" title="Documentación de Shaolin's Blind Fury"
href="index.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li class="right" >
+ <a href="escenas.html" title="Escenas"
+ accesskey="N">siguiente</a> |</li>
+ <li class="right" >
+ <a href="index.html" title="Documentación de Shaolin's Blind
Fury"
+ accesskey="P">anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="el-objeto-director">
+<h1>El objeto Director<a class="headerlink" href="#el-objeto-director"
title="Enlazar permanentemente con este título">¶</a></h1>
+<p>El objeto director es el que mantiene en funcionamiento
+el juego, y es uno de los componentes principales de
+la biblioteca <a class="reference external"
href="http://cocos2d.org/">cocos2d</a>.</p>
+<p>Este objeto se inicializa dentro de la función <tt class="docutils
literal"><span class="pre">main</span></tt>
+del programa princial. Donde además se genera una escena
+para que comience a ejecutarse.</p>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h4>Tema anterior</h4>
+ <p class="topless"><a href="index.html"
+ title="Capítulo anterior">Documentación
de Shaolin&#8217;s Blind Fury</a></p>
+ <h4>Próximo tema</h4>
+ <p class="topless"><a href="escenas.html"
+ title="Próximo capítulo">Escenas</a></p>
+ <h3>Esta página</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/director.txt"
+ rel="nofollow">Enseñar el código</a></li>
+ </ul>
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li class="right" >
+ <a href="escenas.html" title="Escenas"
+ >siguiente</a> |</li>
+ <li class="right" >
+ <a href="index.html" title="Documentación de Shaolin's Blind
Fury"
+ >anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/escenas.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,149 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Escenas &mdash; sbfury v0.1 documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ <link rel="next" title="Colisiones" href="colisiones.html" />
+ <link rel="prev" title="El objeto Director" href="director.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li class="right" >
+ <a href="colisiones.html" title="Colisiones"
+ accesskey="N">siguiente</a> |</li>
+ <li class="right" >
+ <a href="director.html" title="El objeto Director"
+ accesskey="P">anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="escenas">
+<h1>Escenas<a class="headerlink" href="#escenas" title="Enlazar
permanentemente con este título">¶</a></h1>
+<div class="section" id="que-son-las-escenas">
+<h2>¿Que son las escenas?<a class="headerlink" href="#que-son-las-escenas"
title="Enlazar permanentemente con este título">¶</a></h2>
+<p>El juego se encuentra dividido en componentes como la presentación, el
+menú principal, la pantalla de créditos... etc.</p>
+<p>A cada uno de estos componentes se los denonina escenas, por ejemplo,
+una escena es la pantalla de presentación:</p>
+<img alt="_images/presents.png" src="_images/presents.png" />
+<p>el menu principal:</p>
+<img alt="_images/menu.png" src="_images/menu.png" />
+<p>o el escenario de juego:</p>
+<img alt="_images/game.png" src="_images/game.png" />
+<p>De forma tal que cada uno de estos componentes es en realidad un
+objeto individual e independiente de los otros.</p>
+<p>Las escenas están dentro del módulo <tt class="docutils literal"><span
class="pre">scene</span></tt> y todas heredan
+de la clase <tt class="docutils literal"><span
class="pre">cocos.scece.Scene</span></tt>.</p>
+<div class="admonition note">
+<p class="first admonition-title">Nota</p>
+<p class="last">Dentro del módulo <tt class="docutils literal"><span
class="pre">sbfury</span></tt> hay un directorio llamado <tt
class="docutils literal"><span class="pre">scene</span></tt>
+donde se encuentra el código de cada escena.</p>
+</div>
+</div>
+<div class="section" id="la-escena-game">
+<h2>La escena Game<a class="headerlink" href="#la-escena-game"
title="Enlazar permanentemente con este título">¶</a></h2>
+<p>La escena <tt class="docutils literal"><span
class="pre">Game</span></tt> carga un nivel y administra todos los
personajes
+y objetos para ese nivel.</p>
+<p>Al iniciar el objeto <tt class="docutils literal"><span
class="pre">Game</span></tt> se puede indicar el nivel
+que tiene que cargar, por ejemplo:</p>
+<div class="highlight-python"><pre>.. code-block:: python</pre>
+</div>
+<blockquote>
+next_scene = scene.game.Game(level=2)
+common.director.run(next_scene)</blockquote>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="index.html">Contenidos</a></h3>
+ <ul>
+<li><a class="reference external" href="#">Escenas</a><ul>
+<li><a class="reference external" href="#que-son-las-escenas">¿Que son las
escenas?</a></li>
+<li><a class="reference external" href="#la-escena-game">La escena
Game</a></li>
+</ul>
+</li>
+</ul>
+
+ <h4>Tema anterior</h4>
+ <p class="topless"><a href="director.html"
+ title="Capítulo anterior">El objeto
Director</a></p>
+ <h4>Próximo tema</h4>
+ <p class="topless"><a href="colisiones.html"
+ title="Próximo
capítulo">Colisiones</a></p>
+ <h3>Esta página</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/escenas.txt"
+ rel="nofollow">Enseñar el código</a></li>
+ </ul>
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li class="right" >
+ <a href="colisiones.html" title="Colisiones"
+ >siguiente</a> |</li>
+ <li class="right" >
+ <a href="director.html" title="El objeto Director"
+ >anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/genindex.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,97 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Índice &mdash; sbfury v0.1 documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="#" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+
+ <h1 id="index">Índice</h1>
+
+ <a href="#S"><strong>S</strong></a>
+
+ <hr />
+
+
+<h2 id="S">S</h2>
+<table width="100%" class="indextable"><tr><td width="33%" valign="top">
+<dl>
+
+<dt><a href="colisiones.html#sprite.Sprite.set_collision">set_collision()
(sprite.Sprite método)</a></dt></dl></td><td width="33%" valign="top"><dl>
+</dl></td></tr></table>
+
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+
+
+
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="#" title="Índice General"
+ >índice</a></li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/index.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,129 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Documentación de Shaolin's Blind Fury &mdash; sbfury v0.1
documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="#" />
+ <link rel="next" title="El objeto Director" href="director.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li class="right" >
+ <a href="director.html" title="El objeto Director"
+ accesskey="N">siguiente</a> |</li>
+ <li><a href="#">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="documentacion-de-shaolin-s-blind-fury">
+<h1>Documentación de Shaolin&#8217;s Blind Fury<a class="headerlink"
href="#documentacion-de-shaolin-s-blind-fury" title="Enlazar
permanentemente con este título">¶</a></h1>
+<p>Contenido:</p>
+<ul>
+<li class="toctree-l1"><a class="reference external"
href="director.html">El objeto Director</a></li>
+<li class="toctree-l1"><a class="reference external"
href="escenas.html">Escenas</a><ul>
+<li class="toctree-l2"><a class="reference external"
href="escenas.html#que-son-las-escenas">¿Que son las escenas?</a></li>
+<li class="toctree-l2"><a class="reference external"
href="escenas.html#la-escena-game">La escena Game</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference external"
href="colisiones.html">Colisiones</a><ul>
+<li class="toctree-l2"><a class="reference external"
href="colisiones.html#collisionmanager">CollisionManager</a></li>
+<li class="toctree-l2"><a class="reference external"
href="colisiones.html#como-se-genera-un-colision">¿Como se genera un
colision?</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference external"
href="stage.html">Stage</a></li>
+<li class="toctree-l1"><a class="reference external"
href="shaolin.html">Shaolin, el protagonista</a></li>
+</ul>
+</div>
+<div class="section" id="indices-and-tables">
+<h1>Indices and tables<a class="headerlink" href="#indices-and-tables"
title="Enlazar permanentemente con este título">¶</a></h1>
+<ul class="simple">
+<li><a class="reference external"
href="genindex.html"><em>Índice</em></a></li>
+<li><a class="reference external" href="modindex.html"><em>Índice de
Módulos</em></a></li>
+<li><a class="reference external" href="search.html"><em>Página de
Búsqueda</em></a></li>
+</ul>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h3><a href="#">Contenidos</a></h3>
+ <ul>
+<li><a class="reference external" href="#">Documentación de
Shaolin&#8217;s Blind Fury</a><ul>
+</ul>
+</li>
+<li><a class="reference external" href="#indices-and-tables">Indices and
tables</a></li>
+</ul>
+
+ <h4>Próximo tema</h4>
+ <p class="topless"><a href="director.html"
+ title="Próximo capítulo">El objeto
Director</a></p>
+ <h3>Esta página</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/index.txt"
+ rel="nofollow">Enseñar el código</a></li>
+ </ul>
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li class="right" >
+ <a href="director.html" title="El objeto Director"
+ >siguiente</a> |</li>
+ <li><a href="#">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/modindex.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Índice Global de Módulos &mdash; sbfury v0.1
documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+
+
+ <script type="text/javascript">
+ DOCUMENTATION_OPTIONS.COLLAPSE_MODINDEX = true;
+ </script>
+
+
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li class="right" >
+ <a href="#" title="Índice Global de Módulos"
+ accesskey="M">módulos</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+
+ <h1 id="global-module-index">Índice Global de Módulos</h1>
+ <a href="#cap-S"><strong>S</strong></a>
+ <hr/>
+
+ <table width="100%" class="indextable" cellspacing="0"
cellpadding="2"><tr class="pcap"><td></td><td>&nbsp;</td><td></td></tr>
+ <tr class="cap"><td></td><td><a
name="cap-S"><strong>S</strong></a></td><td></td></tr><tr>
+ <td></td>
+ <td>
+ <a href="index.html#module-stage"><tt
class="xref">stage</tt></a></td><td>
+ <em></em></td></tr>
+ </table>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li class="right" >
+ <a href="#" title="Índice Global de Módulos"
+ >módulos</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/objects.inv Sun Jun 6 19:36:23 2010
@@ -0,0 +1,4 @@
+# Sphinx inventory version 1
+# Project: sbfury
+# Version: 0.1
+sprite.Sprite.set_collision method colisiones.html
=======================================
--- /dev/null
+++ /doc/build/html/search.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,92 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Búsqueda &mdash; sbfury v0.1 documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <script type="text/javascript" src="_static/searchtools.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <h1 id="search-documentation">Búsqueda</h1>
+ <div id="fallback" class="admonition warning">
+ <script type="text/javascript">$('#fallback').hide();</script>
+ <p>
+ Please activate JavaScript to enable the search
+ functionality.
+ </p>
+ </div>
+ <p>
+ From here you can search these documents. Enter your search
+ words into the box below and click "search". Note that the search
+ function will automatically search for all of the words. Pages
+ containing fewer words won't appear in the result list.
+ </p>
+ <form action="" method="get">
+ <input type="text" name="q" value="" />
+ <input type="submit" value="buscar" />
+ <span id="search-progress" style="padding-left: 10px"></span>
+ </form>
+
+ <div id="search-results">
+
+ </div>
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ <script type="text/javascript" src="searchindex.js"></script>
+
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/searchindex.js Sun Jun 6 19:36:23 2010
@@ -0,0 +1,1 @@
+Search.setIndex({desctypes:{"0":"method"},terms:{collision_manag:1,code:3,cargar:3,tupl:1,simulando:5,mantien:2,cocos2d:2,hace:5,config:1,principal:2,otro:3,hai:[3,1],forma:3,"funci\u00f3n":2,atributo:1,menu:3,vez:[1,5],quiera:[],otra:1,common:3,rectangulo:1,instancia:1,colision:[0,1,5],collis:[],main:2,add_enemi:1,heredan:3,biblioteca:2,princial:2,cuando:1,genera:[2,0,1],scene:3,"cr\u00e9dito":3,game:[0,3,1,5],desd:5,realiza:1,independient:3,ejecutars:2,"pod\u00e9":5,scece:3,level:3,determinar:1,enemyexampl:1,object_to_follow:[],"m\u00e1ximo":1,princip:3,alguien:1,debug:1,set:[],ser:1,cosa:1,agrega:[],individu:3,comienc:2,ejemplo:3,colis:[0,1],toda:3,entr:1,relativa:1,pantalla:[3,1],ello:1,todo:[3,1],"\u00edndice":0,variabl:1,"documentaci\u00f3n":0,est:[2,1],porqu:5,"men\u00fa":3,contenido:0,juego:[2,3,1],escena:[2,0,3,5],carga:3,emitir:1,fuerza:1,eso:1,pued:[3,1],llamado:[3,5],interaccion:1,"b\u00fasqueda":0,run:3,insertar:[],tienen:1,arg:[],component:[2,3,5],durant:1,"adem\u00e1":2,que:[2,0,3,1],como:[0,3,1],ver:[1,5],"m\u00e9todo":1,habilitar:1,rect:1,stage:[0,1,5],next_scen:3,set_collis:1,protagonista:[0,4,1],add_el:[],quier:1,collisionmanag:[0,1,5],etc:3,archivo:1,escenario:[3,5],fals:[],interno:5,gestiona:[],produc:1,block:3,uno:[2,3,1,5],blind:0,encuentra:[3,1],realidad:[3,1],golpear:1,por:3,number:[],son:[0,3,1],detectar:1,cada:3,furi:0,dond:[2,3,1],"m\u00f3dulo":[0,3,5],enemigo:1,tarea:5,aislado:5,area:1,"est\u00e1n":3,new_enemi:1,existen:1,"\u00fanica":1,actualiza:1,"class":[],adminitra:[],"int":1,magnitud:[],"presentaci\u00f3n":3,elemento:[],sprite:1,para:[2,3,1],forc:1,sbfuri:3,imag:[],"c\u00f3digo":3,part:1,lista:1,shaolin:[0,4],"ejecut\u00e1":5,none:[],metodo:1,administra:[3,5],must_be_upd:[],can:[],horizont:5,defin:1,del:[2,3,1],indicar:3,coco:3,personaj:[3,1],denomina:1,layer:[],directorio:[3,5],iniciar:3,esto:3,indic:0,golpeando:1,collision:[],kwarg:[],exist:1,tabl:0,tal:3,"colisi\u00f3n":1,muestra:[],"est\u00e9":1,segundo:1,una:[2,3,1],comportamiento:1,self:1,denonina:3,clase:[3,1],python:[3,5],nota:[3,1,5],"rect\u00e1ngulo":1,pueden:1,pasar:1,dividido:3,organizado:[],frecuencia:1,nivel:3,tiempo:1,tien:[3,1],buscando:1,max:[],nodo:[],inicializa:2,funcionamiento:[2,5],llamar:1,utiliza:1,director:[2,0,3],important:5,cualquier:[],encarga:1,objeto:[2,0,3,1,5],hacer:1,element:[],dentro:[2,3,1],estan:1,sfburi:5,"p\u00e1gina":0,programa:2,vean:1,conoc:[],seguir:[],con:[1,5],imprim:[1,5],scroll:5,"c\u00e1mara":[]},titles:["Documentaci\u00f3n
de
Shaolin&#8217;s Blind Fury","Colisiones","El objeto
Director","Escenas","Shaolin, el
protagonista","Stage"],modules:{},descrefs:{"sprite.Sprite":{set_collision:[1,0]}},filenames:["index","colisiones","director","escenas","shaolin","stage"]})
=======================================
--- /dev/null
+++ /doc/build/html/shaolin.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Shaolin, el protagonista &mdash; sbfury v0.1
documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="shaolin-el-protagonista">
+<h1>Shaolin, el protagonista<a class="headerlink"
href="#shaolin-el-protagonista" title="Enlazar permanentemente con este
título">¶</a></h1>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h3>Esta página</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/shaolin.txt"
+ rel="nofollow">Enseñar el código</a></li>
+ </ul>
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/build/html/stage.html Sun Jun 6 19:36:23 2010
@@ -0,0 +1,108 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <title>Stage &mdash; sbfury v0.1 documentation</title>
+ <link rel="stylesheet" href="_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '#',
+ VERSION: '0.1',
+ COLLAPSE_MODINDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="_static/jquery.js"></script>
+ <script type="text/javascript" src="_static/doctools.js"></script>
+ <script type="text/javascript" src="_static/translations.js"></script>
+ <link rel="top" title="sbfury v0.1 documentation" href="index.html" />
+ <link rel="prev" title="Colisiones" href="colisiones.html" />
+ </head>
+ <body>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ accesskey="I">índice</a></li>
+ <li class="right" >
+ <a href="colisiones.html" title="Colisiones"
+ accesskey="P">anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+
+ <div class="document">
+ <div class="documentwrapper">
+ <div class="bodywrapper">
+ <div class="body">
+
+ <div class="section" id="stage">
+<h1>Stage<a class="headerlink" href="#stage" title="Enlazar
permanentemente con este título">¶</a></h1>
+<p>El objeto Stage es uno de los componentes mas importantes
+de la escena <tt class="docutils literal"><span
class="pre">Game</span></tt>, porque hace dos tareas: Imprime
+el escenario simulando un scroll horizontal y a la vez
+administra las colisiones con un objeto interno llamado
+CollisionManager</p>
+<img alt="_images/stage.png" src="_images/stage.png" />
+<div class="admonition note">
+<p class="first admonition-title">Nota</p>
+<p class="last">Podés ver en funcionamiento el módulo <tt class="docutils
literal"><span class="pre">stage.py</span></tt> aislado
+si ejecutás <tt class="docutils literal"><span class="pre">python</span>
<span class="pre">stage.py</span></tt> desde el directorio <tt
class="docutils literal"><span class="pre">sfbury</span></tt>.</p>
+</div>
+</div>
+
+
+ </div>
+ </div>
+ </div>
+ <div class="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ <h4>Tema anterior</h4>
+ <p class="topless"><a href="colisiones.html"
+ title="Capítulo
anterior">Colisiones</a></p>
+ <h3>Esta página</h3>
+ <ul class="this-page-menu">
+ <li><a href="_sources/stage.txt"
+ rel="nofollow">Enseñar el código</a></li>
+ </ul>
+ <div id="searchbox" style="display: none">
+ <h3>Búsqueda rápida</h3>
+ <form class="search" action="search.html" method="get">
+ <input type="text" name="q" size="18" />
+ <input type="submit" value="Ir a" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="related">
+ <h3>Navegación</h3>
+ <ul>
+ <li class="right" style="margin-right: 10px">
+ <a href="genindex.html" title="Índice General"
+ >índice</a></li>
+ <li class="right" >
+ <a href="colisiones.html" title="Colisiones"
+ >anterior</a> |</li>
+ <li><a href="index.html">sbfury v0.1 documentation</a> &raquo;</li>
+ </ul>
+ </div>
+ <div class="footer">
+ &copy; Copyright 2010, Hugo Ruscitti.
+ Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.5.
+ </div>
+ </body>
+</html>
=======================================
--- /dev/null
+++ /doc/source/colisiones.rst Sun Jun 6 19:36:23 2010
@@ -0,0 +1,53 @@
+Colisiones
+==========
+
+Durante el juego uno puede golpear a los enemigos y
+a su vez los enemigos nos pueden golpear. A este
+comportamiento se lo denomina colisiones. Y son las
+únicas interacciones entre personajes que existen.
+
+.. image:: images/collision_debug_on.png
+
+
+CollisionManager
+----------------
+
+Hay una instancia de este objeto dentro de ``Stage``, que
+a su vez es parte de ``Game``.
+
+``CollisionManager`` se encarga de detectar si los personajes
+se estan golpeando o no. Para ello tiene dos listas de personajes,
+una se utiliza para el protagonista y otra para los enemigos.
+
+¿Como se genera un colision?
+----------------------------
+
+El objeto ``CollisionManager`` en realidad se actualiza todo
+el tiempo buscando atributos en los personajes para determinar
+si existen colisiones o no.
+
+Cuando un objeto quiere emitir una colisión tienen que pasar
+dos cosas. Una es que el personaje esté en una de
+las listas del ``CollisionManager``, cosa que se realiza
+con frecuencia cuando se genera el objeto::
+
+ new_enemy = EnemyExample()...
+ self.stage.collision_manager.add_enemy(new_enemy)
+
+
+Lo segundo que tiene que hacer el personaje para emitir una
+colisión es llamar al método ``set_collision`` de la clase
+``Sprite``:
+
+.. automethod:: sprite.Sprite.set_collision
+
+
+Este metodo produce un rectángulo que el ``CollisionManager``
+va a detectar y con eso va a ver si existe un colisión con
+alguien mas.
+
+.. note::
+
+ Si quieres que los rectangulos de colision se vean
+ en pantalla tienes que habilitar la variable ``DEBUG`` en
+ el archivo ``config.py``
=======================================
--- /dev/null
+++ /doc/source/director.rst Sun Jun 6 19:36:23 2010
@@ -0,0 +1,10 @@
+El objeto Director
+==================
+
+El objeto director es el que mantiene en funcionamiento
+el juego, y es uno de los componentes principales de
+la biblioteca `cocos2d <http://cocos2d.org/>`_.
+
+Este objeto se inicializa dentro de la función ``main``
+del programa princial. Donde además se genera una escena
+para que comience a ejecutarse.
=======================================
--- /dev/null
+++ /doc/source/images/collision_debug_on.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/source/images/game.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/source/images/menu.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/source/images/presents.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/source/images/stage.png Sun Jun 6 19:36:23 2010
Binary file, no diff available.
=======================================
--- /dev/null
+++ /doc/source/shaolin.rst Sun Jun 6 19:36:23 2010
@@ -0,0 +1,4 @@
+Shaolin, el protagonista
+========================
+
+
=======================================
--- /dev/null
+++ /doc/source/stage.rst Sun Jun 6 19:36:23 2010
@@ -0,0 +1,18 @@
+Stage
+=====
+
+El objeto Stage es uno de los componentes mas importantes
+de la escena ``Game``, porque hace dos tareas: Imprime
+el escenario simulando un scroll horizontal y a la vez
+administra las colisiones con un objeto interno llamado
+CollisionManager
+
+
+.. image:: images/stage.png
+
+
+
+.. note::
+
+ Podés ver en funcionamiento el módulo ``stage.py`` aislado
+ si ejecutás ``python stage.py`` desde el directorio ``sfbury``.
=======================================
--- /doc/source/escenas.rst Sat May 29 23:16:02 2010
+++ /doc/source/escenas.rst Sun Jun 6 19:36:23 2010
@@ -1,15 +1,38 @@
Escenas
=======

-El juego se encuentra organizado por escenas, la presentación, el
+¿Que son las escenas?
+---------------------
+
+El juego se encuentra dividido en componentes como la presentación, el
menú principal, la pantalla de créditos... etc.

+A cada uno de estos componentes se los denonina escenas, por ejemplo,
+una escena es la pantalla de presentación:
+
+.. image:: images/presents.png
+
+el menu principal:
+
+.. image:: images/menu.png
+
+o el escenario de juego:
+
+.. image:: images/game.png
+
+De forma tal que cada uno de estos componentes es en realidad un
+objeto individual e independiente de los otros.
+
Las escenas están dentro del módulo ``scene`` y todas heredan
de la clase ``cocos.scece.Scene``.

-
-Game
-----
+.. note::
+
+ Dentro del módulo ``sbfury`` hay un directorio llamado ``scene``
+ donde se encuentra el código de cada escena.
+
+La escena Game
+--------------

La escena ``Game`` carga un nivel y administra todos los personajes
y objetos para ese nivel.
=======================================
--- /doc/source/index.rst Sun Jun 6 16:14:06 2010
+++ /doc/source/index.rst Sun Jun 6 19:36:23 2010
@@ -11,14 +11,13 @@
.. toctree::
:maxdepth: 2

+ director
escenas
+ colisiones
+ stage
+ shaolin


-.. automodule:: stage
-
-.. autoclass:: Stage
- :members:
-
Indices and tables
==================

=======================================
***Additional files exist in this changeset.***

==============================================================================
Revision: d93d484c25
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Wed Jun 9 22:52:11 2010
Log: cambiando la animacion de explosion cuando un personaje es golpeado.
http://code.google.com/p/sbfury/source/detail?r=d93d484c25

Added:
/data/hits.png
Modified:
/sbfury/collision.py

=======================================
--- /dev/null
+++ /data/hits.png Wed Jun 9 22:52:11 2010
Binary file, no diff available.
=======================================
--- /sbfury/collision.py Sun Jun 6 19:36:23 2010
+++ /sbfury/collision.py Wed Jun 9 22:52:11 2010
@@ -5,80 +5,45 @@
# License: GPLv3 (see http://www.gnu.org/licenses/gpl.html)

from random import randint
-
import cocos.layer
-from cocos.actions import *
-from pyglet.gl import *
-
-import common
-
-class LeptonHitEffect(cocos.sprite.Sprite):
- """Show a impact effect for collisions."""
-
- def __init__(self, x, y):
- image = common.load_image('effects/hit.png')
-
- r = randint(200, 255)
- g = randint(200, 255)
- b = randint(200, 255)
-
- super(HitEffect, self).__init__(image, color=(r, g, b))
- self.position = x, y
- speed = 0.3
- self.scale = 0
- self.do(RotateBy(130, duration=speed) |
- ScaleTo(2, duration=speed) |
- FadeOut(duration=speed) +
- CallFunc(self._kill))
-
- def draw(self):
- # FIX: this is a bugfix for nvidia old drivers.
- glColor4f(1, 1, 1, 1)
- cocos.sprite.Sprite.draw(self)
- glColor4f(1, 1, 1, 1)
-
- def _kill(self):
- self.parent.remove(self)
-
-class HitEffect(cocos.sprite.Sprite):
+
+
+#from cocos.actions import *
+#from pyglet.gl import *
+import sprite
+import animation
+
+import common
+
+
+class HitEffect(sprite.Sprite):
"""Show a impact effect for collisions."""

def __init__(self, x, y):
- image = common.load_image('effects/hit.png')
-
- r = randint(200, 255)
- g = randint(200, 255)
- b = randint(200, 255)
-
- super(HitEffect, self).__init__(image, color=(r, g, b))
- self.position = x, y
- speed = 0.3
- self.scale = 0
- self.do(RotateBy(130, duration=speed) |
- ScaleTo(2, duration=speed) |
- FadeOut(duration=speed) +
- CallFunc(self._kill))
-
- def draw(self):
- # FIX: this is a bugfix for nvidia old drivers.
- glColor4f(1, 1, 1, 1)
- cocos.sprite.Sprite.draw(self)
- glColor4f(1, 1, 1, 1)
+ self.animation = animation.Animation("hits.png", 5, 0.05)
+ super(HitEffect, self).__init__(must_be_updated=True)
+ self.position = x, y
+
+ def update(self, dt):
+ """Update animation state. Returns True if animation are done."""
+
+ if self.animation.update(dt):
+ self._kill()
+ return
+
+ self.image = self.animation.image
+
+ #def draw(self):
+ # # FIX: this is a bugfix for nvidia old drivers.
+ # glColor4f(1, 1, 1, 1)
+ # glColor4f(1, 1, 1, 1)

def _kill(self):
self.parent.remove(self)


class CollisionManager(cocos.layer.Layer):
- """Gestiona colisiones entre el protagonistra y los Enemigos.
-
- Este objeto tiene dos listas ``objects_group_a`` y ``objects_group_b``.
-
- Cada vez que se actualiza el objeto se busca si los sprites
- de un grupo emiten colisiones para sprites del otro grupo. Y además
- se fija si efectivamente esas emisiones de colisiones realmente
- afectan a algun personaje.
- """
+ """Handle collision between sprite objects."""

def __init__(self):
super(CollisionManager, self).__init__()
@@ -93,14 +58,12 @@
self.objects_group_b.append(sprite)

def update(self, dt):
- """Avisa a los personajes que se intercambian colisiones."""
+ """Do collision check."""

for a in self.objects_group_a:
for b in self.objects_group_b:

- # si un objeto del grupo 'a' le pega a uno del grupo 'b'...
if self._get_collision(send=a, receive=b):
- # le avisa a los dos objetos que existe una colisión.
a.on_collision_send(b)

if b.on_collision_receive(a, a.collision_force):
@@ -113,21 +76,20 @@
self._create_collision_effect((a.x, a.y))

def _create_collision_effect(self, (x, y)):
- "Genera un efecto de golpe ante la colisión."
-
x += randint(-30, 30)
y += randint(-20, 20)
- self.add(LeptonHitEffect(x, y + 110))
+ self.add(HitEffect(x, y + 110))

def _get_collision(self, send, receive):
- """Analiza si existe una colision entre dos personajes.
-
- Para que exista un colision entre un sprite y otro, el
- emisor tiene que tener un atributo llamado ``rect_collision``
- que esté justo solapado con el rectángulo del receptor,
- rectángulo que se obtiene con el método
- ``get_collision_receive_area``. """
-
+ """Checks collision between two sprites.
+
+ :Parameters:
+ `send`: Sprite
+ Sprite that send a rectangle collision.
+ `receive`: Sprite
+ Sprite that receive the attack of sprite `a`.
+ """
+
if send.rect_collision and self.are_close_in_z_plane(send,
receive):
x0, y0, w0, h0 = send.get_rect_collision_world_position()
x1, y1, w1, h1 = receive.get_collision_receive_area()
@@ -137,10 +99,5 @@
return True

def are_close_in_z_plane(self, sprite_a, sprite_b):
- """Indica si los dos personajes estan cerca respecto del plano z.
-
- El plano z es el de profundidad, y es el que depermina si una
- colision es posible o no.
- """
if abs(sprite_a.y - sprite_b.y) < 30:
return True

==============================================================================
Revision: 22b58fd839
Author: Hugo Ruscitti <hugoru...@gmail.com>
Date: Wed Jun 9 22:58:56 2010
Log: arreglando la posicion del efecto grafico de colision. Tambien
evitando que se vea la imagen nula.
http://code.google.com/p/sbfury/source/detail?r=22b58fd839

Modified:
/sbfury/collision.py

=======================================
--- /sbfury/collision.py Wed Jun 9 22:52:11 2010
+++ /sbfury/collision.py Wed Jun 9 22:58:56 2010
@@ -22,6 +22,7 @@
def __init__(self, x, y):
self.animation = animation.Animation("hits.png", 5, 0.05)
super(HitEffect, self).__init__(must_be_updated=True)
+ self.image = self.animation.image
self.position = x, y

def update(self, dt):
@@ -67,7 +68,7 @@
a.on_collision_send(b)

if b.on_collision_receive(a, a.collision_force):
- self._create_collision_effect((b.x, b.y))
+ self._create_collision_effect((a.x, a.y), a.flip)

elif self._get_collision(send=b, receive=a):
b.on_collision_send(a)
@@ -75,10 +76,16 @@
if a.on_collision_receive(b, b.collision_force):
self._create_collision_effect((a.x, a.y))

- def _create_collision_effect(self, (x, y)):
+ def _create_collision_effect(self, (x, y), flip):
x += randint(-30, 30)
y += randint(-20, 20)
- self.add(HitEffect(x, y + 110))
+
+ if flip:
+ dx = -80
+ else:
+ dx = 90
+
+ self.add(HitEffect(x + dx, y + 80))

def _get_collision(self, send, receive):
"""Checks collision between two sprites.
Reply all
Reply to author
Forward
0 new messages