Class cocos.grid.GridBase

object --+
         |
        GridBase
A Scene that takes two scenes and makes a transition between them

Methods

  __init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  init(self, grid)
Initializes the grid creating both a vertex_list for an independent-tiled grid and creating also a vertex_list_indexed for a "united" (non independent tile) grid.
  before_draw(self)
Binds the framebuffer to a texture and set a 2d projection before binding to prevent calculating a new texture
  after_draw(self, camera)
Called by CocosNode when the texture is already grabbed.
Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Instance Variables

  grid
size of the grid.
  x_step
x pixels between each vertex (float)
  y_step
y pixels between each vertex (float)

Class Variables

  texture = None
  active = property(_get_active, _set_active, doc= '''Determines...

Method Details

__init__

(Constructor) __init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
object.__init__

init

init(self, grid)
Initializes the grid creating both a vertex_list for an independent-tiled grid and creating also a vertex_list_indexed for a "united" (non independent tile) grid.
Parameters:
grid : euclid.Point2
size of a 2D grid

after_draw

after_draw(self, camera)
Called by CocosNode when the texture is already grabbed. The FrameBuffer will be unbound and the texture will be drawn
Parameters:
camera : Camera
The target's camera object.

Instance Variable Details

grid

size of the grid. (rows, columns)

Class Variable Details

active

Value:
property(_get_active, _set_active, doc= '''Determines whether the grid\
 is active or not                 
                     :type: bool
                     ''')