- 关于onTouchEnd中触点changedTouches的坐标游戏
- 需求的场景描述(希望解决的问题) 用代码监听413<posX<440 378<posY<404(机型iphone7 屏幕大小为375X667) 这一片区域(对应一个关闭按钮,有点击这片区域时 清除ctx) 但屏幕大小改变(如换成320X568的iphone5) 按钮对应区域不再是413<posX<440 378<posY<404了 wx.onTouchEnd(event => { let lastTouchPoint = event.changedTouches[0]; let posX = lastTouchPoint.screenX; let posY = lastTouchPoint.screenY; console.log("--------------posX-----------",posX); console.log("--------------posY-----------",posY); let leftBoundary=413+(width-375)/2; let rightBoundary=440+(width-375)/2; let topBoundary=378+(height-667); let bottomBoundary=404+(height-667); if (posX <= rightBoundary && posX >= leftBoundary && posY >= topBoundary && posY <= bottomBoundary) { ctx.clearRect(0, 0, sharedCanvas.width, sharedCanvas.height); wx.offTouchEnd(); } }) - 希望提供的能力 试过用比例算法将范围定为413*(width/375) 等 但触点的ScreenX 与ScreenY并不与比例对应 求解触点与屏幕大小的适应关系
2018-06-28 - 微信托管数据如何定时刷新
是否可以在玩家不登陆游戏的情况下 刷新微信这边的数据 否则排行榜上的数据服务器更新了 微信已托管的数据不会更新
2018-06-15 - 微信排行榜条目显示问题
[图片] 上图为期望的排行榜形式 下图为使用WX画出来的形式 [图片] 请问是否只能在开放域中通过代码绘制成上图形式(比如数字使用数字位图表示)
2018-06-05 - 是否有些手机获取不到开放数据域
比如我的IP7+ 小游戏在开发工具上可以运行 用IP7+扫码进去会报错为undefiend 是否有详细的机型指示 求解
2018-06-04