Class cocos.tiles.HexCell

object --+    
         |    
      Cell --+
             |
            HexCell

A flat-top, regular hexagon cell from a HexMap.

Cell attributes:
i, j -- index of this cell in the map width, height -- dimensions properties -- arbitrary properties cell -- cell from the MapLayer's cells
Read-only attributes:
x, y -- bottom-left pixel top -- y pixel extent bottom -- y pixel extent left -- (x, y) of left corner pixel right -- (x, y) of right corner pixel center -- (x, y) origin -- (x, y) of bottom-left corner of bounding rect topleft -- (x, y) of top-left corner pixel topright -- (x, y) of top-right corner pixel bottomleft -- (x, y) of bottom-left corner pixel bottomright -- (x, y) of bottom-right corner pixel midtop -- (x, y) of middle of top side pixel midbottom -- (x, y) of middle of bottom side pixel midtopleft -- (x, y) of middle of left side pixel midtopright -- (x, y) of middle of right side pixel midbottomleft -- (x, y) of middle of left side pixel midbottomright -- (x, y) of middle of right side pixel

Note that all pixel attributes are not adjusted for screen, view or layer transformations.

Methods

  __init__(self, i, j, height, properties, tile)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  get_origin(self)
  origin(self)
  get_top(self)
  top(self)
  get_bottom(self)
  bottom(self)
  get_center(self)
  center(self)
  get_midtop(self)
  midtop(self)
  get_midbottom(self)
  midbottom(self)
  get_left(self)
  left(self)
  get_right(self)
  right(self)
  get_topleft(self)
  topleft(self)
  get_topright(self)
  topright(self)
  get_bottomleft(self)
  bottomleft(self)
  get_bottomright(self)
  bottomright(self)
  get_midtopleft(self)
  midtopleft(self)
  get_midtopright(self)
  midtopright(self)
  get_midbottomleft(self)
  midbottomleft(self)
  get_midbottomright(self)
  midbottomright(self)
  __repr__(self)
repr(x)
(Inherited from cocos.tiles.Cell)
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__

(Constructor) __init__(self, i, j, height, properties, tile)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
Cell.__init__