An entity representing the solid ground. The ground is represented
with a single entity, which uses multiple bodies to define the space
covered by the ground, and tiles mutliple sprites to display the ground
itself.
Ground is divided into 100x100 tiles, and the corners of ground tiles
must be placed at multiples of (100,100).
Method Summary |
|
__init__(self,
style,
tiles)
|
|
add_tiles(self,
tiles)
|
|
icon(cls,
style)
(Class method)
|
|
remove_tiles(self,
tiles)
|
|
tiles(self,
i,
j)
|
|
_make_bodies (self)
Create the bounding boxes for this ground object. |
|
_make_sprite(self,
col,
row)
|
|
_make_sprites(self)
|
|
_match_sprite_borders(self,
borders,
template)
|
|
_refresh(self)
|
Inherited from Entity |
|
__repr__ (self)
|
|
add_body (self,
body)
|
|
add_sprite (self,
sprite)
|
|
after (self,
duration,
callback,
*params,
**kwparams)
After the given duration has elapsed, call the given callback
function. |
|
handle_collision (self,
obstacle,
side)
Called when one of the entity's bodies collides with another body. |
|
handle_lose_support (self,
old_support)
Called when one of the entity's bodies becomes unsupported. |
|
handle_movement (self,
dx,
dy)
Called when one of the entity's bodies moves. |
|
remove_body (self,
body)
|
|
remove_sprite (self,
sprite)
|
|
update (self,
duration)
Perform any necessary updates to this entity. |
|
use (self)
Define this method for entities that the avatar can 'use'. |
|
_check_after_callbacks (self,
duration)
|
Inherited from object |
|
__delattr__ (...)
x.__delattr__('name') <==> del x.name |
|
__getattribute__ (...)
x.__getattribute__('name') <==> x.name |
|
__hash__ (x)
Return hash(x)... |
|
__new__ (T,
S,
...)
Return a new object with type S, a subtype of T... |
|
__reduce__ (...)
helper for pickle |
|
__reduce_ex__ (...)
helper for pickle |
|
__setattr__ (...)
x.__setattr__('name', value) <==> x.name = value |
|
__str__ (x)
Return str(x)... |