public bool Run()
{
int distance = Picturebox_move[Randomizer.Next(Picturebox_move.Length)];
Point p = MyPictureBox.Location;
p.X += distance;
MyPictureBox.Location = p;
if (MyPictureBox.Location.X >=RacetrackLength)
{
return true;
}
else
{
return false;
}
}
以上是我寫的物件
private void timer1_Tick(object sender, EventArgs e)
{
start.Run();
if (true)
{
timer1.Enabled = false;
}
else
{
timer1.Enabled = true;
}
}
可是怎麼都不會跑進
if (true)
{
timer1.Enabled = false;
}
有可能哪邊寫錯