SKSpriteKit,检测非透明部件 [英] SKSpriteKit, detect non-transparency parts

查看:96
本文介绍了SKSpriteKit,检测非透明部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在SKSpriteKit制作游戏,我正在尝试使用此图像创建一个前景对象, http:// minus.com/i/OQ0boloElnCr

I am making a game in SKSpriteKit, I am trying to make a foreground object with this Image, http://minus.com/i/OQ0boloElnCr

如果一个物体接触到图片中的非透明度(天花板和岩石路径),物体就会死亡。
是否可以在Sprite工具包中检测天花板,图像的非透明部分

if an object touches the non-transparency in the picture(the ceiling and rock paths), the object dies. Is it possible in Sprite kit to detect the ceiling, the non-transparency parts of the image

推荐答案

类似的问题此处。答案解释了物理在sprite工具包中的工作原理。我认为这就是你想要的。

There is a similar question here. The answer explains how physics work in sprite kit. I think this is what you are loking for.

希望它有所帮助。

这篇关于SKSpriteKit,检测非透明部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆