ó
X–Tc           @   s]   d  d l  Z  d  d l Z d  d l m Z d  d l Z g  a d „  Z d e f d „  ƒ  YZ	 d S(   iÿÿÿÿN(   t   refc          C   s;   g  t  D]* }  |  ƒ  d k	 r |  ƒ  j ƒ  r |  ^ q a  d S(   sp   
    Ensure that dead sprites are removed from the list and that sprites are
    redrawn on a scene change.
    N(   t   _all_spritest   Nonet   _expire_static(   t   s(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _switch_scene	   s    t   Spritec           B   s#  e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z  d „  Z! d  „  Z" d! „  Z# d" „  Z$ d# „  Z% d$ „  Z& d% „  Z' d& „  Z( d' „  Z) d( „  Z* d) „  Z+ d* „  Z, d+ „  Z- d, „  Z. d- „  Z/ d. „  Z0 e1 e e ƒ Z2 e1 e e ƒ Z3 e1 e e ƒ Z4 e1 e e ƒ Z5 e1 e e ƒ Z6 e1 e e ƒ Z7 e1 e e  ƒ Z8 e1 e! e" ƒ Z9 e1 e# e$ ƒ Z: e1 e e ƒ Z; e1 e e ƒ Z< e1 e e ƒ Z= e1 e% e& ƒ Z> e1 e' e( ƒ Z? e1 e) e* ƒ Z@ e1 e+ e, ƒ ZA e1 e e ƒ ZB e1 e- ƒ ZC e1 e. ƒ ZD e1 e/ e0 ƒ ZE d/ „  ZF d0 „  ZG d1 „  ZH d2 „  ZI d3 „  ZJ d4 „  ZK d5 „  ZL d6 „  ZM d7 „  ZN RS(8   s@  
    Sprites are how images are positioned and drawn onto the screen.
    They aggregate together information such as where to be drawn,
    layering information, and more.

    :param parent: The parent that this Sprite will belong to.
    :type parent: :class:`View <spyral.View>` or :class:`Scene <spyral.Scene>`
    c         C   sð   d | k rO | j  d ƒ } t | t ƒ r< t j | ƒ } n  t |  d | ƒ n  d d d d d d d d	 d
 d d d d d g } x< | D]4 } | | k r† | j  | ƒ } t |  | | ƒ q† q† Wt | ƒ d k rì t j j |  | j	 ƒ  ƒ n  d S(   s  
        The __stylize__ function is called during initialization to set up
        properties taken from a style function. Sprites that want to override
        default styling behavior should implement this class, although that
        should rarely be necessary.
        t   imaget   post   xt   yt   positiont   anchort   layert   visiblet   scalet   scale_xt   scale_yt   flip_xt   flip_yt   anglet   maski    N(
   t   popt
   isinstancet   strt   spyralt   Imaget   setattrt   lent
   exceptionst   unused_style_warningt   iterkeys(   t   selft
   propertiesR   t   simplet   propertyt   value(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   __stylize__   s    	c         C   sŒ  t  j t |  ƒ ƒ d |  _ t |  _ d  |  _ d  |  _ d  |  _	 d |  _
 t |  _ t j d d ƒ |  _ d |  _ t |  _ d |  _ t j d d ƒ |  _ t j d d ƒ |  _ d  |  _ t | ƒ |  _ t | j ƒ |  _ d |  _ d  |  _ d  |  _ t j d d ƒ |  _ t |  _ t |  _ g  |  _ i  |  _  d  |  _! | j" |  ƒ |  j ƒ  j# |  ƒ |  j ƒ  j$ |  ƒ t j% j& d |  j' d |  j ƒ  ƒd  S(   Ni    i   t   topleftg      ð?s   director.rendert   scene((   R   t   appendt   _wreft   _aget   Falset   _staticR   t   _imaget   _image_versiont   _layert   _computed_layert   _make_staticR   t   Vec2Dt   _post   _blend_flagst   Truet   _visiblet   _anchort   _offsett   _scalet   _scaled_imaget   _parentR'   t   _scenet   _anglet   _cropt   _transform_imaget   _transform_offsett   _flip_xt   _flip_yt   _animationst	   _progresst   _maskt
   _add_childt   _register_spritet   _apply_stylet   eventt   registert   _draw(   R    t   parent(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   __init__3   s>    																			c         C   s   t  |  _ t  |  _ d S(   sm   
        Forces this class to be static, indicating that it will not be redrawn
        every frame.
        N(   R5   R1   R,   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_staticV   s    	c         C   s?   |  j  r |  j ƒ  j |  ƒ n  t |  _  d |  _ |  j ƒ  t S(   sÆ   
        Force this class to no longer be static; it will be redrawn for a few
        frames, until it has sufficiently aged. This also triggers the collision
        box to be recomputed.
        i    (   R,   R<   t   _remove_static_blitR+   R*   t   _set_collision_boxR5   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyR   ^   s    			
c         C   sf   |  j  d k r d S|  j |  j j } t j j |  j | d | d ƒ } t j	 | ƒ |  j
 |  _ d S(   s   
        Recalculates this sprite's offset based on its position, transform
        offset, anchor, its image, and the image's scaling.
        Ni    i   (   R   R   R9   R-   t   sizeR   t   utilt   _anchor_offsetR7   R2   R@   R8   (   R    RQ   t   offset(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _recalculate_offsetm   s
    #c         C   s  |  j  j } |  j s |  j r? t j j | |  j |  j ƒ } n  |  j d k rç |  j |  j  j } t	 | d ƒ t	 | d ƒ f } d | k rº t
 j j d ƒ |  _ |  j ƒ  |  j ƒ  d St
 j j | ƒ } t j j | | | ƒ } n  |  j d k r`d t j |  j d } t
 j | j ƒ  j ƒ } t j j | | ƒ j ƒ  } | j ƒ  j } | | |  _ n  | |  _ |  j ƒ  |  j ƒ  d S(	   sŽ   
        Calculates the transforms that need to be applied to this sprite's
        image. In order: flipping, scaling, and rotation.
        g      ð?i    i   Ng     €f@ih  (   g      ð?g      ð?(   i   i   (   R-   t   _surfRA   RB   t   pygamet	   transformt   flipR9   RQ   t   intR   R   t   _new_spyral_surfaceR?   RU   R   t   smoothscaleR=   t   matht   piR2   t   get_rectt   centert   rotatet   convert_alphaR@   (   R    t   sourcet   new_sizet   new_surfR   t   oldt   new(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _recalculate_transformsz   s,    ! 

	
c         C   sM   | j  |  | ƒ } x4 | j D]) } | | k r t |  | | | ƒ q q Wd S(   sš   
        Performs a step of the given animation, setting any properties that will
        change as a result of the animation (e.g., x position).
        N(   t   evaluateR!   R   (   R    t	   animationt   progresst   valuesR#   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _evaluate   s    c         C   s  g  } xí |  j  D]â } |  j | c | 7<|  j | } | | j k râ |  j | | j ƒ | j t k r• |  j | | | j ƒ | | j |  j | <qò | j rÒ | | j | j } |  j | | ƒ | |  j | <qò | j | ƒ q |  j | | ƒ q Wx | D] } |  j | ƒ qý Wd S(   sz   
        For a given time-step (delta), perform a step of all the animations
        associated with this sprite.
        N(   RC   RD   t   durationRm   t   loopR5   R(   t   stop_animation(   R    t   deltat	   completedRj   Rk   t   current(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _run_animations§   s"    	c         C   s   t  j |  j |  j ƒ S(   s×  
        Returns a :class:`Rect <spyral.Rect>` representing the position and size
        of this Sprite's image. Note that if you change a property of this rect
        that it will not actually update this sprite's properties:
        
        >>> my_sprite.rect.top = 10
        
        Does not adjust the y coordinate of `my_sprite`. Changing the rect will
        adjust the sprite however
        
        >>> my_sprite.rect = spyral.Rect(10, 10, 64, 64)
        (   R   t   RectR3   RQ   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _get_rectÃ   s    c         G   sÃ   t  | ƒ d k rQ | d } | j | j |  _ |  _ | j | j |  _ |  _ nn t  | ƒ d k r€ | d |  _ | d |  _ n? t  t	 ƒ d k r³ t	 \ |  _ |  _ |  _ |  _ n t
 d ƒ ‚ d  S(   Ni   i    i   i   s   TODO: You done goofed.(   R   R	   R
   t   wt   ht   widtht   heightR   RQ   t   argst
   ValueError(   R    t   rectt   r(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _set_rectÒ   s    
!c         C   s   |  j  S(   st   
        The position of a sprite in 2D coordinates, represented as a
        :class:`Vec2D <spyral.Vec2D>`
        (   R3   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_posß   s    c         C   s3   | |  j  k r d  St j | ƒ |  _  |  j ƒ  d  S(   N(   R3   R   R2   R   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_posæ   s    c         C   s   |  j  S(   s|   
        String. The name of the layer this sprite belongs to. See
        :ref:`layering <ref.layering>` for more.
        (   R/   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _get_layerì   s    c         C   sK   | |  j  k r d  S| |  _  |  j ƒ  j |  j ƒ  | ƒ |  _ |  j ƒ  d  S(   N(   R/   R<   t   _get_layer_positionR;   R0   R   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _set_layeró   s    	c         C   s   |  j  S(   sD   
        The :class:`Image <spyral.Image>` for this sprite.
        (   R-   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _get_imageû   s    c         C   s@   |  j  | k r d  S| |  _  | j |  _ |  j ƒ  |  j ƒ  d  S(   N(   R-   t   _versionR.   Rh   R   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _set_image  s    	
c         C   s   |  j  ƒ  d S(   sm   
        The x coordinate of the sprite, which will remain synced with the
        position. Number.
        i    (   R€   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_x	  s    c         C   s   |  j  | |  j ƒ  f ƒ d  S(   N(   R   t   _get_y(   R    R	   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_x  s    c         C   s   |  j  ƒ  d S(   sl   
        The y coordinate of the sprite, which will remain synced with the
        position. Number
        i   (   R€   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyR‰     s    c         C   s   |  j  |  j ƒ  | f ƒ d  S(   N(   R   Rˆ   (   R    R
   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_y  s    c         C   s   |  j  S(   s~   
        Defines an :ref:`anchor point <ref.anchors>` where coordinates are relative to
        on the image. String.
        (   R7   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_anchor  s    c         C   s4   | |  j  k r d  S| |  _  |  j ƒ  |  j ƒ  d  S(   N(   R7   RU   R   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_anchor$  s
    	
c         C   s   |  j  r |  j  j ƒ  Sd S(   sF   
        The width of the image after all transforms. Number.
        N(   R?   t	   get_width(   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _get_width+  s    	c         C   s(   |  j  | |  j ƒ  |  j d f ƒ d  S(   Ni   (   t
   _set_scaleR   R9   (   R    Ry   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _set_width2  s    c         C   s   |  j  r |  j  j ƒ  Sd S(   sG   
        The height of the image after all transforms. Number.
        N(   R?   t
   get_height(   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_height5  s    	c         C   s(   |  j  |  j d | |  j ƒ  f ƒ d  S(   Ni    (   R   R9   R“   (   R    Rz   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_height<  s    c         C   s/   |  j  r t j |  j  j ƒ  ƒ St j d d ƒ S(   s]   
        The size of the image after all transforms (:class:`Vec2D <spyral.Vec2D>`).
        i    (   R?   R   R2   t   get_size(   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _get_size?  s    	c         C   s+   |  j  t |  j ƒ  t |  j ƒ  f ƒ d  S(   N(   R   Ry   R   Rz   R“   (   R    RQ   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _set_sizeG  s    c         C   s   |  j  S(   s  
        A scale factor for resizing the image. When read, it will always contain
        a :class:`spyral.Vec2D` with an x factor and a y factor, but it can be
        set to a numeric value which wil ensure identical scaling along both
        axes.
        (   R9   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _get_scaleK  s    c         C   sg   t  | t t f ƒ r* t j | | ƒ } n  |  j | k r= d  St j | ƒ |  _ |  j ƒ  |  j ƒ  d  S(   N(   R   RZ   t   floatR   R2   R9   Rh   R   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyR   T  s    
c         C   s   |  j  d S(   sU   
        The x factor of the scaling that's kept in sync with scale. Number.
        i    (   R9   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_scale_x]  s    c         C   s   |  j  | |  j d f ƒ d  S(   Ni   (   R   R9   (   R    R	   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_scale_xc  s    c         C   s   |  j  d S(   sU   
        The y factor of the scaling that's kept in sync with scale. Number.
        i   (   R9   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_scale_yf  s    c         C   s   |  j  |  j d | f ƒ d  S(   Ni    (   R   R9   (   R    R
   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_scale_yl  s    c         C   s   |  j  S(   sÌ   
        An angle to rotate the image by. Rotation is computed after scaling and
        flipping, and keeps the center of the original image aligned with the
        center of the rotated image.
        (   R=   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _get_angleo  s    c         C   s*   |  j  | k r d  S| |  _  |  j ƒ  d  S(   N(   R=   Rh   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _set_anglew  s    	c         C   s   |  j  S(   se   
        A boolean that determines whether the image should be flipped
        horizontally.
        (   RA   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_flip_x}  s    c         C   s*   |  j  | k r d  S| |  _  |  j ƒ  d  S(   N(   RA   Rh   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_flip_x„  s    	c         C   s   |  j  S(   sc   
        A boolean that determines whether the image should be flipped
        vertically.
        (   RB   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_flip_yŠ  s    c         C   s*   |  j  | k r d  S| |  _  |  j ƒ  d  S(   N(   RB   Rh   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_flip_y‘  s    	c         C   s   |  j  S(   sK   
        A boolean indicating whether this sprite should be drawn.
        (   R6   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_visible—  s    c         C   s*   |  j  | k r d  S| |  _  |  j ƒ  d  S(   N(   R6   R   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _set_visible  s    	c         C   s
   |  j  ƒ  S(   sM   
        The top-level scene that this sprite belongs to. Read-only.
        (   R<   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt
   _get_scene£  s    c         C   s
   |  j  ƒ  S(   sˆ   
        The parent of this sprite, either a :class:`View <spyral.View>` or a
        :class:`Scene <spyral.Scene>`. Read-only.
        (   R;   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   _get_parent©  s    c         C   s   |  j  S(   s§   
        A :class:`Rect <spyral.Rect>` to use instead of the current image's rect
        for computing collisions. `None` if the image's rect should be used.
        (   RE   (   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _get_mask°  s    c         C   s   | |  _  |  j ƒ  d  S(   N(   RE   RP   (   R    R   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt	   _set_mask·  s    	c         C   s5  |  j  s d S|  j d k r. t j d ƒ ‚ n  |  j |  j j k ri |  j j |  _ |  j ƒ  |  j ƒ  n  |  j	 rv d St j
 |  j j ƒ  ƒ } t j j |  j |  j |  j | |  j |  j t ƒ } |  j sÚ |  j d k rt | _ t |  _ t |  _	 |  j ƒ  j |  | ƒ d S|  j ƒ  j | ƒ |  j d 7_ d S(   sä   
        Internal method for generating this sprite's blit, unless it is
        invisible or currently static. If it has aged sufficiently or is being
        forced, it will become static; otherwise, it ages one step.
        Ns7   A sprite must have an image set before it can be drawn.i   i   (   R   R-   R   R   t   NoImageErrorR.   R†   Rh   R   R,   Ru   R?   R_   RR   t   _BlitR3   R8   R0   R4   R+   R1   R*   R5   t   staticR;   t   _static_blitt   _blit(   R    t   areat   b(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyRK   Ð  s2    	
					c         C   s—   |  j  d k r d S|  j d k r= t j |  j j ƒ  ƒ } n	 |  j } t j j |  j	 |  j
 | ƒ } |  j ƒ  j | ƒ } |  j ƒ  j |  | j ƒ d S(   s6   
        Updates this sprite's collision box.
        N(   R   R   RE   R   Ru   R?   R_   RR   t   _CollisionBoxR3   R8   R;   t   _warp_collision_boxR<   RP   R}   (   R    R¯   t   ct
   warped_box(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyRP   ó  s    	c         C   s=   |  j  ƒ  j |  ƒ |  j  ƒ  j |  ƒ |  j ƒ  j |  ƒ d S(   s"  
        When you no longer need a Sprite, you can call this method to have it
        removed from the Scene. This will not remove the sprite entirely from
        memory if there are other references to it; if you need to do that,
        remember to ``del`` the reference to it.
        N(   R<   t   _unregister_spriteRO   R;   t   _remove_child(   R    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   kill  s    c         C   sî   x? |  j  D]4 } | j j | j ƒ r
 t d | j f ƒ ‚ q
 q
 Wt |  j  ƒ d k r t j j d |  j	 d d |  j
 ƒ  ƒn  |  j  j | ƒ d |  j | <|  j | d ƒ t j d | d |  ƒ } t j j d	 |  j j | j f | ƒ d
 S(   sé   
        Animates this sprite given an animation. Read more about
        :class:`animation <spyral.animation>`.

        :param animation: The animation to run.
        :type animation: :class:`Animation <spyral.Animation>`
        s"   Cannot animate on propety %s twicei    s   director.updateRq   R'   g        Rj   t   sprites   %s.%s.animation.startN(   s   delta(   RC   R!   t   intersectionR|   R#   R   R   RI   RJ   Rt   R<   R(   RD   Rm   t   Eventt   handlet	   __class__t   __name__(   R    Rj   t   at   e(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   animate  s     
c         C   s¨   | |  j  k r¤ |  j  j | ƒ |  j | =t j d | d |  ƒ } t j j d |  j j | j	 f | ƒ t
 |  j  ƒ d k r¤ t j j d |  j d |  j ƒ  ƒq¤ n  d S(   s¼   
        Stops a given animation currently running on this sprite.

        :param animation: The animation to stop.
        :type animation: :class:`Animation <spyral.Animation>`
        Rj   R¸   s   %s.%s.animation.endi    s   director.updateR'   N(   RC   t   removeRD   R   Rº   RI   R»   R¼   R½   R#   R   t
   unregisterRt   R<   (   R    Rj   R¿   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyRp   %  s    

	c         C   s%   x |  j  D] } |  j | ƒ q
 Wd S(   sH   
        Stops all animations currently running on this sprite.
        N(   RC   Rp   (   R    Rj   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   stop_all_animations9  s    c         C   s   |  j  ƒ  j |  | ƒ S(   s£  
        Returns whether this sprite is currently colliding with the other
        sprite. This collision will be computed correctly regarding the sprites
        offsetting and scaling within their views.

        :param other: The other sprite
        :type other: :class:`Sprite <spyral.Sprite>`
        :returns: ``bool`` indicating whether this sprite is colliding with the
                  other sprite.
        (   R<   t   collide_sprites(   R    t   other(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   collide_sprite@  s    c         C   s   |  j  ƒ  j |  | ƒ S(   sŠ  
        Returns whether this sprite is currently colliding with the position.
        This uses the appropriate offsetting for the sprite within its views.

        :param point: The point (relative to the window dimensions).
        :type point: :class:`Vec2D <spyral.Vec2D>`
        :returns: ``bool`` indicating whether this sprite is colliding with the
                  position.
        (   R<   t   collide_point(   R    t   point(    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyRÇ   M  s    
c         C   s   |  j  ƒ  j |  | ƒ S(   s}  
        Returns whether this sprite is currently colliding with the rect. This
        uses the appropriate offsetting for the sprite within its views.

        :param rect: The rect (relative to the window dimensions).
        :type rect: :class:`Rect <spyral.Rect>`
        :returns: ``bool`` indicating whether this sprite is colliding with the
                  rect.
        (   R<   t   collide_rect(   R    R}   (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyRÉ   Y  s    
(O   R½   t
   __module__t   __doc__R%   RM   RN   R   RU   Rh   Rm   Rt   Rv   R   R€   R   R‚   R„   R…   R‡   Rˆ   RŠ   R‰   R‹   RŒ   R   R   R‘   R“   R”   R–   R—   R˜   R   Rš   R›   Rœ   R   Rž   RŸ   R    R¡   R¢   R£   R¤   R¥   R¦   R§   R¨   R©   R#   R   R   R   R	   R
   R   R   R   R   Ry   Rz   RQ   R   R   R   R   R}   R'   RL   R   RK   RP   R·   RÀ   Rp   RÃ   RÆ   RÇ   RÉ   (    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyR      s˜   		#				#	
																																										#							(
   R   RW   t   weakrefR    R)   R]   R   R   t   objectR   (    (    (    s1   /usr/lib/python2.7/site-packages/spyral/sprite.pyt   <module>   s   	
