Difference between revisions of "Shape:setData"

 
m
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{oldin|[[0.8.0]]|080|type=function|text=Use [[Fixture:setUserData]] instead}}
 +
Set data to be passed to the collision callback.
  
 +
When a shape collides, the value set here will be passed to the collision callback as one of the parameters. Typically, you would want to store a table reference here, but any value can be used.
  
 
== Function ==
 
== Function ==
Line 12: Line 15:
 
== See Also ==
 
== See Also ==
 
* [[parent::Shape]]
 
* [[parent::Shape]]
 +
* [[Shape:getData]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=}}
+
{{#set:Description=Set data to be passed to the collision callback.}}
 +
{{#set:Since=000}}
 +
== Other Languages ==
 +
{{i18n|Shape:setData}}

Latest revision as of 17:52, 29 May 2013

Removed in LÖVE 0.8.0
Use Fixture:setUserData instead.

Set data to be passed to the collision callback.

When a shape collides, the value set here will be passed to the collision callback as one of the parameters. Typically, you would want to store a table reference here, but any value can be used.

Function

Synopsis

Shape:setData( v )

Arguments

any v
Any Lua value.

Returns

Nothing.

See Also


Other Languages