cocos creator 手游摇杆

教程来源:

http://gad.qq.com/article/detail/37702

进化:

  • 无方向
  • 加入摇杆中心的移动范围限制
  • game.ts为游戏入口

       joystick为摇杆类

       在game.ts中调用joystick类

坑:

爸爸坐标与世界坐标问题: https://docs.cocos.com/creator/manual/zh/content-workflow/transform.html

猜你喜欢

转载自blog.csdn.net/weixin_41824127/article/details/85071966