Difference between revisions of "Shape:getMaskBits"

(I was told in the forum this has been removed, note to that effect)
(Added see also links, broken(?) example)
Line 12: Line 12:
 
=== Returns ===
 
=== Returns ===
 
{{param|number|mask|An integer value representing the mask.}}
 
{{param|number|mask|An integer value representing the mask.}}
 +
== Examples ==
 +
=== Prints 6 ===
 +
<source lang="lua">
 +
shape:setMask(1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, 16)
 +
print(shape:getMaskBits()) -- errors, seems to be nil?
 +
</source>
 
== See Also ==
 
== See Also ==
 
* [[parent::Shape]]
 
* [[parent::Shape]]
 +
* [[Shape:getMask]]
 +
* [[Shape:setMask]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Returns a 16-bit integer representing the masked categories.  
 
{{#set:Description=Returns a 16-bit integer representing the masked categories.  
 
}}
 
}}

Revision as of 16:32, 18 October 2010

Returns a 16-bit integer representing the masked categories. A set bit means that a collision occurs with members of that category.

N.B. This function is no longer available in LÖVE version 0.6.1.

Function

Synopsis

mask = Shape:getMaskBits( )

Arguments

None.

Returns

number mask
An integer value representing the mask.

Examples

Prints 6

shape:setMask(1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, 16)
print(shape:getMaskBits()) -- errors, seems to be nil?

See Also