Cocos2d defines ccGridSize
as:
typedef struct _ccGridSize { NSInteger x; NSInteger y; } ccGridSize;
And provides a built-in factory function:
static inline ccGridSize ccg(const NSInteger x, const NSInteger y);
So you can write your call like:
... grid:ccg(gridSizeX, gridSizeY)
Where gridSizeX
and gridSizeY
determine the number of grid columns and rows for your effect.
source share