pygamelib.board_items.ComplexWall¶
-
class
pygamelib.board_items.
ComplexWall
(**kwargs)¶ New in version 1.2.0.
A complex wall is nothing more than a
Wall
mashed with aBoardComplexItem
.It supports all parameters of both with inheritance going first to Wall and second to BoardComplexItem.
The main interest is of course the multiple cell representation and the Sprites support.
Example:
wall = ComplexWall( sprite=sprite_brick_wall )
-
__init__
(**kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(**kwargs)Initialize self. can_move
()Return the capability of moving of an item. collides_with
(other)Tells if this item collides with another item. debug_info
()Return a string with the list of the attributes and their current value. display
()Print the model WITHOUT carriage return. distance_to
(other)Calculates the distance with an item. inventory_space
()Return the size of the Immovable Item for the Inventory
.item
(row, column)Return the item at the row, column position if it is within the item’s boundaries. overlappable
()This represent the capacity for a BoardItem
to be overlapped by player or NPC.pickable
()This represent the capacity for a BoardItem
to be pick-up by player or NPC.position_as_vector
()Returns the current item position as a Vector2D restorable
()This represent the capacity for an Immovable
Movable
item.store_position
(row, column)Store the BoardItem position for self access. update_sprite
()Update the complex item with the current sprite. Attributes
column
Convenience method to get the current stored column of the item. height
Convenience method to get the height of the item. row
Convenience method to get the current stored row of the item. width
Convenience method to get the width of the item. -