Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
入体,怎么实现触屏限定区域?就是要实现左边触屏是控制方向,右边触屏是攻击。
方法A:放两个透明(不透明度为0但不是隐藏)的触摸块占满屏幕左右各一半,触屏操作哪个触摸块就对应哪一边的操作。方法B:判断触屏操作的坐标,触屏x坐标小于屏幕宽度的一半就视为操作左边,否则就视为操作右边。