Difference between revisions of "B2.World:setDebugDraw"

From GiderosMobile
Line 3: Line 3:
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/>
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.World|b2.World]]<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
<translate><br />
+
Registers a b2.DebugDraw instance for debug drawing.
Registers a b2.DebugDraw instance for debug drawing.<br />
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
b2.World:setDebugDraw()
+
b2.World:setDebugDraw()
 
</source>
 
</source>
 +
 
=== <translate>Examples</translate> ===
 
=== <translate>Examples</translate> ===
'''Example'''<br/>
+
'''Example'''
<source lang="lua">local debugDraw = b2.DebugDraw.new()
+
<source lang="lua">
 +
local debugDraw = b2.DebugDraw.new()
 
world:setDebugDraw(debugDraw)
 
world:setDebugDraw(debugDraw)
stage:addChild(debugDraw)</source>
+
stage:addChild(debugDraw)
 +
</source>
 +
 
 +
{{B2.World}}

Revision as of 17:27, 18 February 2020


Available since: Gideros 2011.6
Class: b2.World

Description

Registers a b2.DebugDraw instance for debug drawing.

b2.World:setDebugDraw()

Examples

Example

local debugDraw = b2.DebugDraw.new()
world:setDebugDraw(debugDraw)
stage:addChild(debugDraw)





LiquidFun