2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module GridBase
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Ref
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Set the size of the grid.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] setGridSize
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #size_table gridSize
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-09-18 11:05:04 +08:00
|
|
|
-- @function [parent=#GridBase] afterBlit
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] afterDraw
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node target
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- @{<br>
|
|
|
|
-- Init and reset the status when render effects by using the grid.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] beforeDraw
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-09-18 11:05:04 +08:00
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Interface, Calculate the vertices used for the blit.
|
2014-09-18 11:05:04 +08:00
|
|
|
-- @function [parent=#GridBase] calculateVertexPoints
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-09-18 11:05:04 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- is texture flipped.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] isTextureFlipped
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Size of the grid.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] getGridSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Pixels between the grids.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] getStep
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Change projection to 2D for grabbing.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] set2DProjection
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Get the pixels between the grids.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] setStep
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table step
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Set the texture flipped or not.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] setTextureFlipped
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool flipped
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Interface used to blit the texture with grid to screen.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] blit
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] setActive
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool active
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Get number of times that the grid will be reused.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] getReuseGrid
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, size_table
|
|
|
|
-- @overload self, size_table, cc.Texture2D, bool
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] initWithSize
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #size_table gridSize
|
|
|
|
-- @param #cc.Texture2D texture
|
|
|
|
-- @param #bool flipped
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-09-18 11:05:04 +08:00
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- @{<br>
|
|
|
|
-- Interface for custom action when before or after draw.
|
2014-09-18 11:05:04 +08:00
|
|
|
-- @function [parent=#GridBase] beforeBlit
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-09-18 11:05:04 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Set number of times that the grid will be reused.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] setReuseGrid
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int reuseGrid
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- @} @{<br>
|
|
|
|
-- Getter and setter of the active state of the grid.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] isActive
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-25 11:59:57 +08:00
|
|
|
-- Interface, Reuse the grid vertices.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] reuse
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GridBase#GridBase self (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, size_table
|
|
|
|
-- @overload self, size_table, cc.Texture2D, bool
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#GridBase] create
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #size_table gridSize
|
|
|
|
-- @param #cc.Texture2D texture
|
|
|
|
-- @param #bool flipped
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return GridBase#GridBase ret (return value: cc.GridBase)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
return nil
|