尝试使用edgeLoopFromRect:view.frame使我的SKSpriteNode保持在仅纵向布局的框架内,并且它只会从框架的左侧反弹并仍然留下间隙....
尝试"查看",edgeLoopFromRect:框架,它飞离屏幕......
任何帮助将不胜感激..
SparseBooleanArray checked = listView.getCheckedItemPositions();
答案 0 :(得分:1)
在override func didMoveToView(view: SKView)
尝试添加:
let borderBody = SKPhysicsBody(edgeLoopFromRect: self.frame)
borderBody.friction = 0
self.physicsBody = borderBody