Class cocos.grid.GridBase

Known Subclasses:
Grid3D, TiledGrid3D
A Scene that takes two scenes and makes a transition between them

Methods

  __init__(self)
  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.

Properties

  active
Determines whether the grid is active or not :type: bool

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

Method Details

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.

Property Details

active

Determines whether the grid is active or not :type: bool

Instance Variable Details

grid

size of the grid. (rows, columns)