예제 #1
0
파일: Form1.cs 프로젝트: tamastatar/enet
        private void D_timer_Tick(object sender, EventArgs e)
        {
            if (D_x == A_x - 20 && D_y == A_y - 20)
            {
                D_timer.Stop();
            }
            else
            {
                do
                {
                    if (D_x < A_x)
                    {
                        D_x++;
                    }
                    else
                    {
                        D_x--;
                    }
                }while (D_x == A_x - 20);

                do
                {
                    if (D_y < A_y)
                    {
                        D_y++;
                    }
                    else
                    {
                        D_y--;
                    }
                }while (D_y == A_y - 20);


                Invalidate();
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: tamastatar/enet
 private void button1_Click(object sender, EventArgs e)
 {
     A_timer.Stop(); B_timer.Stop(); C_timer.Stop(); D_timer.Stop();
 }