Make a popup in Sprite kit in Swift

六眼飞鱼酱① 提交于 2019-12-12 03:07:05

问题


I am making a game in sprite kit with swift, when the game over, I want to make a popup appear for viewing scores and re-play. How can I do that? I made that like a SKNode but I think it is not a good way to do when I have too many Node in the popup.


回答1:


You could use UIKit. So you could show a semi-transparent ModalViewController if the game is over. That way you can use the Storyboard to design it. Also you can design it in to fit the design of your game and don't have to handle the touches in your touchesBegan method but you can use UIButtons etc.



来源:https://stackoverflow.com/questions/28749552/make-a-popup-in-sprite-kit-in-swift

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!