标签: html5 canvas
我试图在线转换愤怒的小鸟的xy坐标,但我无法弄清楚如何计算y坐标!
以下是游戏中的数据: http://120403-1305-dot-latest-dot-project-slingshot-hr.appspot.com/fowl/json/Level1-1.json
x坐标由x - item width / 2计算,每个对象都在右边的位置。
我无法弄清楚如何计算y坐标到像素。
任何帮助将不胜感激!
答案 0 :(得分:0)
这很简单: 我用它来找到一个像素的坐标,我想它也适用于愤怒的小鸟;)
y =指数/身高
在这里查看我的答案: Convert from coordinates to pixels