1
var img1 = (pictureBox1.Image = Properties.Resources.dynamite);
var img2 = (pictureBox2.Image = Properties.Resources.apple);
if (img1 != img2)
{
MessageBox.Show("ok");
pictureBox1.Image = Properties.Resources.empty;
}
else
{
MessageBox.Show("no");
Game_Over end = new Game_Over();
end.Show();
}
我想創建一個簡單的遊戲。如果我打了果果選擇器是更換一個白衣空選擇器,如果你打一個炸藥拿到比賽結束如何檢查兩個PictureBox是否具有相同的圖像?
獲取位圖並比較每個像素。 –
http://stackoverflow.com/a/35153895/6527049 –
那麼,水果忍者? –