我想要做的是检查完美像素colision与2黑色边缘纹理例如:其中一个纹理是一个圆圈,第二个可以是三角形或矩形。如何从Texture2D XNA c#获取颜色和坐标(x,y)?
这是我的代码,给我的只有颜色的排列没有它,我需要
Color[] playerColorArray = new Color[texturePlayer.Width * texturePlayer.Height];
Color[] secondColorArray = new Color[secondTexture.Width * sencondTexture.Height];
texturePlayer.GetData(playerColorArray);
secondTexture.GetData(secondTextureArray);
和我的问题是如何从的Texture2D获取坐标对于其在这的Texture2D黑色每个像素坐标。
感谢提前:)
但我不得不说..即时通讯使用这生成从一个彩色图像瓷砖地图...但它不是很好....它的偏移量每行1宽度....没有找到错误的地方... – Zerq 2014-06-07 20:32:43