pyj2d :: sprite :: collide_rect_ratio :: Class collide_rect_ratio

Class collide_rect_ratio

object --+
         |
        collide_rect_ratio

pyj2d.sprite.collide_rect_ratio

Return a callable that checks if the rects of the two sprites intersect. The ratio attribute will determine scaling of the rect, where 1.0 is same size. Can be used as spritecollide callback function.

Instance Methods
 
__init__(self, ratio)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__call__(self, sprite1, sprite2)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, ratio)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)