我想了解从 GameScene 访问 UIViewController 方法的最佳实践是什么。现在我一直在使用 NSNotificationCenter,但由于我想要实现的特定功能,我不想使用它。
另外,如果没有任何其他方法可以通过 GameScene 访问 UIViewController,那么我真正想知道的是能够在没有 UIViewController 的情况下在 GameScene 中呈现 UIAlertController 的方法。
我只想为 UIViewController 创建一个全局变量,但我听说这是不好的做法。
谢谢!