我正在C#上编程Visual Studio 2016,并且正在制作游戏。我需要重复一个pictureBox。它应该从屏幕的右侧开始,然后移动到屏幕的左侧。如何在屏幕上重复图片框来模拟动画?
我该怎么做?目前,我有这样的代码:
while (pictureBox4.Location.X == -10 && pictureBox4.Location.Y == -2)
{
pictureBox4.Location = new Point(pictureBox4.Location.X - x, pictureBox4.Location.Y - y);
}
X & y是随机变量。
我很惊讶,当看到你在Visual Studio 2016编程)您是指2015年或2017? –
这是VS 2017,对不起 –
'while(pictureBox4.Location.X == -10' should not that'> ='?? if'while'while while'。慷慨和add和'else'子句!当然,没有告诉我们代码从哪里来的都是猜测......! – TaW