简体   繁体   English

Lua代码,游戏中的正方形

[英]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. 您可能在游戏中启用了physics rendering mode/DrawMode作为hybrid physics rendering mode/DrawMode So, comment the following line: 因此,注释以下行:

physics.setDrawMode( "hybrid" )

or replace it with the following line: 或将其替换为以下行:

physics.setDrawMode( "normal" )

For more details, visit: physics.setDrawMode 有关更多详细信息,请访问: physics.setDrawMode

Keep Coding..................... :) 保持编码..................... :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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