| Trees | Indices | Toggle frames |
|---|
layer.Layer --+
|
ScrollableLayer --+
|
MapLayer
Base class for Maps.
Maps are comprised of tiles and can figure out which tiles are required to be rendered on screen.
Both rect and hex maps have the following attributes:
id -- identifies the map in XML and Resources (width, height) -- size of map in cells (px_width, px_height) -- size of map in pixels (tw, th) -- size of each cell in pixels (origin_x, origin_y, origin_z) -- offset of map top left from origin in pixels cells -- array [i][j] of Cell instances debug -- display debugging information on cells
The debug flag turns on textual display of data about each visible cell including its cell index, origin pixel and any properties set on the cell.
| __init__(self) | |
| set_dirty(self) | |
| set_view(self, x, y, w, h) | |
|
get_visible_cells(self)
Given the current view in map-space pixels, transform it based
on the current screen-space transform and figure the region of
map-space pixels currently visible.
|
|
| set_debug(self, debug) | |
| draw(self) (Inherited from cocos.tiles.ScrollableLayer) |
debug = False
|
|
origin_x = 0
(Inherited from cocos.tiles.ScrollableLayer)
|
|
origin_y = 0
(Inherited from cocos.tiles.ScrollableLayer)
|
|
origin_z = 0
(Inherited from cocos.tiles.ScrollableLayer)
|
Given the current view in map-space pixels, transform it based on the current screen-space transform and figure the region of map-space pixels currently visible.
Pass to get_in_region to return a list of Cell instances.
| Trees | Indices | Toggle frames |
|---|
| Generated by Epydoc 3.0beta1 on Sat Sep 6 13:21:12 2008 | http://epydoc.sourceforge.net |