Moai SDK
1.5 revision 1 (MoaiEdition)
|
Get the grid currently connected to the prop.
function getGrid ( MOAIProp2D self )
self | ( MOAIProp2D ) |
Gets the value of the deck indexer.
function getIndex ( MOAIProp2D self )
self | ( MOAIProp2D ) |
Returns the current priority of the node or 'nil' if the priority is uninitialized.
function getPriority ( MOAIProp2D self )
self | ( MOAIProp2D ) |
Returns true if the given world space point falls inside the prop's bounds.
function inside ( MOAIProp2D self, number x, number y, number z [, number pad ] )
self | ( MOAIProp2D ) |
x | ( number ) |
y | ( number ) |
z | ( number ) |
pad | ( number ) Optional. Pad the hit bounds (in the prop's local space) |
Set the blend mode.
function setBlendMode ( MOAIProp2D self )
self | ( MOAIProp2D ) |
function setBlendMode ( MOAIProp2D self, number mode )
self | ( MOAIProp2D ) |
mode | ( number ) One of MOAIProp2D.BLEND_NORMAL, MOAIProp2D.BLEND_ADD, MOAIProp2D.BLEND_MULTIPLY. |
function setBlendMode ( MOAIProp2D self, number srcFactor, number dstFactor )
self | ( MOAIProp2D ) |
srcFactor | ( number ) |
dstFactor | ( number ) |
Sets and enables face culling.
function setCullMode ( MOAIProp2D self [, number cullMode ] )
self | ( MOAIProp2D ) |
cullMode | ( number ) Optional. Default value is MOAIProp2D.CULL_NONE. |
Sets or clears the deck to be indexed by the prop.
function setDeck ( MOAIProp2D self [, MOAIDeck deck ] )
self | ( MOAIProp2D ) |
deck | ( MOAIDeck ) Optional. Default value is nil. |
Disables or enables depth writing.
function setDepthMask ( MOAIProp2D self [, boolean depthMask ] )
self | ( MOAIProp2D ) |
depthMask | ( boolean ) Optional. Default value is true. |
Sets and enables depth testing (assuming depth buffer is present).
function setDepthTest ( MOAIProp2D self [, number depthFunc ] )
self | ( MOAIProp2D ) |
depthFunc | ( number ) Optional. Default value is MOAIProp2D.DEPTH_TEST_DISABLE. |
Used when drawing with a layout scheme (i.e. MOAIGrid). Expanding for sort causes the prop to emit a sub-prim for each component of the layout. For example, when attaching a MOAIGrid to a prop, each cell of the grid will be added to the render queue for sorting against all other props and sub-prims. This is obviously less efficient, but still more efficient then using an separate prop for each cell or object.
function setExpandForSort ( MOAIProp2D self, boolean expandForSort )
self | ( MOAIProp2D ) |
expandForSort | ( boolean ) Default value is false. |
Sets the fitting frame of the prop.
function setFrame ( MOAIProp2D self )
self | ( MOAIProp2D ) |
function setFrame ( MOAIProp2D self, number xMin, number yMin, number xMax, number yMax )
self | ( MOAIProp2D ) |
xMin | ( number ) |
yMin | ( number ) |
xMax | ( number ) |
yMax | ( number ) |
Sets or clears the prop's grid indexer. The grid indexer (if any) will override the standard indexer.
function setGrid ( MOAIProp2D self [, MOAIGrid grid ] )
self | ( MOAIProp2D ) |
grid | ( MOAIGrid ) Optional. Default value is nil. |
Scale applied to deck items before rendering to grid cell.
function setGridScale ( MOAIProp2D self [, number xScale, number yScale ] )
self | ( MOAIProp2D ) |
xScale | ( number ) Optional. Default value is 1. |
yScale | ( number ) Optional. Default value is 1. |
Set the prop's index into its deck.
function setIndex ( MOAIProp2D self [, number index ] )
self | ( MOAIProp2D ) |
index | ( number ) Optional. Default value is 1. |
This method has been deprecated. Use MOAINode setAttrLink instead.
function setParent ( MOAIProp2D self [, MOAINode parent ] )
self | ( MOAIProp2D ) |
parent | ( MOAINode ) Optional. Default value is nil. |
Reimplemented from MOAIColor.
Sets or clears the node's priority. Clear the priority to have MOAIPartition automatically assign a priority to a node when it is added.
function setPriority ( MOAIProp2D self [, number priority ] )
self | ( MOAIProp2D ) |
priority | ( number ) Optional. Default value is nil. |
Set a remapper for this prop to use when drawing deck members.
function setRemapper ( MOAIProp2D self [, MOAIDeckRemapper remapper ] )
self | ( MOAIProp2D ) |
remapper | ( MOAIDeckRemapper ) Optional. Default value is nil. |
Sets or clears the prop's shader. The prop's shader takes precedence over any shader specified by the deck or its elements.
function setShader ( MOAIProp2D self [, MOAIShader shader ] )
self | ( MOAIProp2D ) |
shader | ( MOAIShader ) Optional. Default value is nil. |
Set or load a texture for this prop. The prop's texture will override the deck's texture.
function setTexture ( MOAIProp2D self, variant texture [, number transform ] )
self | ( MOAIProp2D ) |
texture | ( variant ) A MOAITexture, MOAIMultiTexture, MOAIDataBuffer or a path to a texture file |
transform | ( number ) Optional. Any bitwise combination of MOAITextureBase.QUANTIZE, MOAITextureBase.TRUECOLOR, MOAITextureBase.PREMULTIPLY_ALPHA |
Sets or clears the prop's UV transform.
function setUVTransform ( MOAIProp2D self [, MOAITransformBase transform ] )
self | ( MOAIProp2D ) |
transform | ( MOAITransformBase ) Optional. Default value is nil. |
Sets or clears the prop's visibility.
function setVisible ( MOAIProp2D self [, boolean visible ] )
self | ( MOAIProp2D ) |
visible | ( boolean ) Optional. Default value is true. |