-3
我有一個向上移動對象的按鈕。我只是想知道我有什麼改變,使其向下移動(不同的按鈕)向下移動一個對象,C#
private void CP_GFButton_Click(object sender, EventArgs e)
{
while (LDoor.Location.Y < 0)
while (Rdoor.Location.Y < 0)
{
LDoor.Location = new System.Drawing.Point(LDoor.Location.X, LDoor.Location.Y - 1);
System.Threading.Thread.Sleep(10);
Rdoor.Location = new System.Drawing.Point(Rdoor.Location.X, Rdoor.Location.Y - 1);
System.Threading.Thread.Sleep(10);
}
}
如果從'Y'使得上去減,然後加入到'Y'應該使它下去吧? – Houseman