Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lua code, square in game

Tags:

lua

coronasdk

I have a problem, the square and the circle you can see in the picture.

Do not know how to delete this, can anyone help me for do not show it?

The example of code is this:

supermanSpriteSheet = sprite.newSpriteSheet("superman.png", 100, 34)
supermanSprites = sprite.newSpriteSet(supermanSpriteSheet, 1, 4)
sprite.add(supermanSprites, "supermanes", 1, 4, 1000, 0)
superman = sprite.newSprite(supermanSprites)
superman.x = 0
superman.y = 100
superman:prepare("supermanes")
superman:play()
superman.collided = false
fisica.addBody(superman, "static", {density=.1, bounce=0.1, friction=.2})
screenGroup:insert(superman)
supermanIntro = transition.to(superman,{time=1000, x=100, onComplete=supermanReady})

The image of game:

img

like image 708
Chete Avatar asked Oct 02 '22 09:10

Chete


1 Answers

You may have enabled physics rendering mode/DrawMode as hybrid in your game. So, comment the following line:

physics.setDrawMode( "hybrid" )

or replace it with the following line:

physics.setDrawMode( "normal" )

For more details, visit: physics.setDrawMode

Keep Coding..................... :)

like image 178
Krishna Raj Salim Avatar answered Oct 05 '22 12:10

Krishna Raj Salim