Unity touch watcher实现

Unity touch watcher implementation


我正在尝试将我的 swipeManager class 实现到 Unity,
所有逻辑都已完成,但我需要确保 class 被调用一次,并且它的 update() 函数在其余检查(例如)swipeManager.swipe.upToDown 是否为真之前被调用...

当然我准备管理器是静态的,以避免多次调用它(事实上我不能依赖自动 update() )...

我是 Unity 的新手,所以请随时纠正我,我实际上是在努力学习我的发展,所以我错过了一些理论 atm(很快就会学习)。

我有启动和更新功能,欢迎在评论中称呼他们说"and here you go with your code"。

提前致谢!

如果要确定脚本执行顺序的优先级,可以勾选here for the Unity event functions order or you chan tale a look at here

希望对您有所帮助。