The debug state of the sprite, true or false.
When your games have complex interactions between sprites or the mouse it is helpful to see in the display area the center of the sprite, the outline of the sprite's collider and the sprite's depth. If set to true, the sprite is shown with the outline of the collider, the depth, and center.
The default debug is false. All sprite properties can be both accessed and updated.
var sprite1 = createSprite(200, 200); sprite1.debug = true; sprite1.setCollider("rectangle", 0, 0, 50, 50); var sprite2 = createSprite(50, 50); sprite2.debug = true; drawSprites();
sprite.debug
The debug state of the sprite, true or false.
drawSprites()
is called.Found a bug in the documentation? Let us know at documentation@code.org