pyjsdl :: sprite :: LayeredUpdates :: Class LayeredUpdates

Class LayeredUpdates

object --+            
         |            
     Group --+        
             |        
 RenderUpdates --+    
                 |    
    OrderedUpdates --+
                     |
                    LayeredUpdates

pyjsdl.sprite.LayeredUpdates

Instance Methods
 
__init__(self, *sprites, **kwargs)
Return LayeredUpdates Optional argument sprites to add to group. If sprite has a _layer attribute, it will be added to that layer, otherwise it will be added to the default layer. If provided a default_layer keyword argument, this will be used as default, otherwise default_layer will be 0. If provided a layer keyword argument, then sprites will be added to that layer regardless of the sprite _layer attribute.
 
copy(self)
Return copy of group.
 
add(self, *sprites, **kwargs)
Add sprite(s) to group, maintaining order based on layer of sprite, derived from sprite _layer attribute or if absent default layer. If layer keyword argument is provided it is used.
 
remove(self, *sprites)
Remove sprite(s) from group.
 
empty(self)
Empty group.
 
get_sprites_at(self, position)
Return sprites at position.
 
get_sprite(self, index)
Return sprite at sprites index.
 
remove_sprites_of_layer(self, layer)
Return sprites removed from layer.
 
layers(self)
Return list of group layers.
 
change_layer(self, sprite, new_layer)
Move sprite to new layer.
 
get_layer_of_sprite(self, sprite)
Return layer of sprite.
 
get_top_layer(self)
Return top layer of group.
 
get_bottom_layer(self)
Return bottom layer of group.
 
move_to_front(self, sprite)
Move sprite to top layer.
 
move_to_back(self, sprite)
Move sprite to layer under bottom layer.
 
get_top_sprite(self)
Return sprite at top.
 
get_sprites_from_layer(self, layer)
Return sprites on layer.
 
switch_layer(self, layer1, layer2)
Move sprites to new layer.

Inherited from OrderedUpdates: __iter__, sprites

Inherited from RenderUpdates: draw

Inherited from Group: __contains__, __len__, __repr__, __str__, clear, has, update

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

Properties

Inherited from object: __class__

Method Details

__init__(self, *sprites, **kwargs)
(Constructor)

 
Return LayeredUpdates Optional argument sprites to add to group. If sprite has a _layer attribute, it will be added to that layer, otherwise it will be added to the default layer. If provided a default_layer keyword argument, this will be used as default, otherwise default_layer will be 0. If provided a layer keyword argument, then sprites will be added to that layer regardless of the sprite _layer attribute.
Overrides: object.__init__

copy(self)

 
Return copy of group.
Overrides: Group.copy

add(self, *sprites, **kwargs)

 
Add sprite(s) to group, maintaining order based on layer of sprite, derived from sprite _layer attribute or if absent default layer. If layer keyword argument is provided it is used.
Overrides: Group.add

remove(self, *sprites)

 
Remove sprite(s) from group.
Overrides: Group.remove

empty(self)

 
Empty group.
Overrides: Group.empty