我正在制作一个纸牌游戏,我创建了 10 张不同的纸牌,我已将图片实现到右侧资源区域的程序中。我的卡片结构如下所示:
public Form1()
{
cards = new PlayCard[10];
cards[0] = new PlayCard("Harry", 97, 33, 40);
cards[1] = new PlayCard("Dave", 80, 91, 41);
cards[2] = new PlayCard("Randle", 90, 13, 45);
cards[3] = new PlayCard("Zach", 30, 98, 81);
cards[4] = new PlayCard("Shorty", 30, 89, 99);
cards[5] = new PlayCard("Matt", 75, 81, 72);
cards[6] = new PlayCard("Aaron", 89, 82, 80);
cards[7] = new PlayCard("Ryan", 25, 83, 71);
cards[8] = new PlayCard("Stephen", 96, 100, 100);
cards[9] = new PlayCard("David", 90, 37, 70);
InitializeComponent();
}
我想知道如何让相应的图片显示确定显示哪张卡
谢谢