Commit a2399e6b authored by lijin's avatar lijin

手机点击BUG

parent e4181be5
......@@ -71,9 +71,7 @@ public class MainData : MonoBehaviour
//涂过了,或点击到线
if (png.GetPixel((int)v.x, (int)v.y) != Color.white) { return false; }
int index = (int)(v.x + v.y * json.width);//图内像素坐标转图内像素索引
Color[] c_map = map.GetPixels();//点阵数据
Color c = c_map[index];//点击的点阵数据:rgba,rg为房间ID,ba为组ID
Color c = map.GetPixel((int)v.x, (int)v.y);//点击的点阵数据:rgba,rg为房间ID,ba为组ID
int roomId = ResJsonData.ColorToV(c).x;
RoomDatas rd = json.roomDatas[roomId];
//涂过了
......@@ -108,9 +106,7 @@ public class MainData : MonoBehaviour
//涂过了,或点击到线
if (png.GetPixel((int)v.x, (int)v.y) != Color.white) { return; }
int index = (int)(v.x + v.y * json.width);//图内像素坐标转图内像素索引
Color[] c_map = map.GetPixels();//点阵数据
Color c = c_map[index];//点击的点阵数据:rgba,rg为房间ID,ba为组ID
Color c = map.GetPixel((int)v.x, (int)v.y);//点击的点阵数据:rgba,rg为房间ID,ba为组ID
int groupId = ResJsonData.ColorToV(c).y;
ChooseGroup(groupId);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment