Home | Trees | Index | Help |
---|
|
object
--+
|
Body
bbox
: The body's bounding box
(read-only).
solid_sides
: A set of flags
indicating which sides of the body are 'solid.'
support
: The body that supports
this body, or None.
support_side
: The side of this body
that it's support is on.
supported_bodies
: A list of the
bodies that are supported by this body.
owner
: A pointer to the game entity
that owns this body.
handle_movmement
method will be called (if defined).
handle_collision
method will be called (if defined).
handle_lose_support
method will be called (if
defined).
Method Summary | |
---|---|
__init__(self,
owner,
bbox,
is_solid,
solid_sides,
is_mobile)
| |
__repr__(self)
| |
jump(self,
dx,
dy,
check_collisions)
| |
jump_to(self,
x,
y,
check_collisions)
| |
move(self,
dx,
dy,
report_collisions)
| |
move_to(self,
x,
y,
report_collisions)
| |
set_bbox(self,
bbox,
check_collisions)
| |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... |
Property Summary | |
---|---|
bbox : A pygame Rect describing the current position of this body's bounding
box. | |
is_mobile : A flag indicating whether this is a mobile body. | |
is_solid : A flag indicating whether this body can participate in collisions. | |
owner : A pointer to the game entity that owns this body. | |
support : The body that supports this body, or None if this body is
not supported. | |
support_side : The side of this body that it's support is on. | |
supported_bodies : A list of the bodies that are supported by this body. | |
xaccel : The x acceleration of the body, in pixels/sec^2. | |
xvel : The x velocity of the body, in pixels/sec. | |
yaccel : The y acceleration of the body, in pixels/sec^2. | |
yvel : The y velocity of the body, in pixels/sec. |
Instance Variable Summary | |
---|---|
NoneType |
physics_engine : A pointer to the physics engine that manages this entity (if any). |
solid_sides : A set of flags indicating which sides of the body are 'solid.' |
Method Details |
---|
__init__(self,
owner,
bbox,
is_solid,
solid_sides,
is_mobile)
|
__repr__(self)
|
jump(self, dx, dy, check_collisions=True) |
jump_to(self, x, y, check_collisions=True) |
move(self, dx, dy, report_collisions=True) |
move_to(self, x, y, report_collisions=True) |
set_bbox(self, bbox, check_collisions=True) |
Property Details |
---|
is_solidA flag indicating whether this body can participate in collisions.
|
ownerA pointer to the game entity that owns this body. This entity will be notified about physical events that occur to the body. (Read-only)
|
supportThe body that supports this body, orNone if this body is
not supported.
|
support_sideThe side of this body that it's support is on. E.g., if the player is standing on top of a platform, then its support will be the platform, and itssupport_side will be BOTTOM .
support_side is expressed using the 'side' constants from pajammin.consts .
|
supported_bodiesA list of the bodies that are supported by this body.
|
xaccelThe x acceleration of the body, in pixels/sec^2.
|
xvelThe x velocity of the body, in pixels/sec.
|
yaccelThe y acceleration of the body, in pixels/sec^2.
|
yvelThe y velocity of the body, in pixels/sec.
|
Instance Variable Details |
---|
physics_engineA pointer to the physics engine that manages this entity (if any). This is initialized byPhysicsEngine.add() . This pointer is used
to perform actions that might impact other bodies (such as move() ).
|
solid_sidesA set of flags indicating which sides of the body are 'solid.' |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Sep 22 22:52:46 2005 | http://epydoc.sf.net |