3812人加入学习
(19人评价)
微信小程序-贪吃蛇

制作完成于2019-10-01,基于微信开发者工具 1.02.1909292

价格 免费

computeDir(x, y) { if (Math.abs(x) > Math.abs(y)) return x > 0 ? 'right' : 'left'; else return y > 0 ? 'bottom' : 'top'; }, const direction = this.computeDir(x, y);

[展开全文]