Difference between revisions of "Shape:getMask"

(Added example, see also links)
Line 9: Line 9:
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|numbers|...|Numbers from 1-16}}
+
{{param|number|...|Numbers from 1-16}}
 +
== Examples ==
 +
=== With how many categories does this shape collide? ===
 +
<source lang="lua">
 +
print('shape collides with', select('#', shape:getMask()), 'categories')
 +
</source>
 
== See Also ==
 
== See Also ==
 
* [[parent::Shape]]
 
* [[parent::Shape]]
 +
* [[Shape:setMask]]
 +
* [[Shape:getMaskBits]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Gets which categories this shape should '''NOT''' collide with.
 
{{#set:Description=Gets which categories this shape should '''NOT''' collide with.
 
}}
 
}}

Revision as of 16:21, 18 October 2010

Gets which categories this shape should NOT collide with. The number of masked categories is the number of return values.

Function

Synopsis

... = Shape:getMask( )

Arguments

None.

Returns

number ...
Numbers from 1-16

Examples

With how many categories does this shape collide?

print('shape collides with', select('#', shape:getMask()), 'categories')

See Also