简体   繁体   中英

Lua code, square in game

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

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..................... :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM