public void moveball() { for (int i = 0; i < this.lmp1.Count; i++) { this.lmp1[i].counter = (this.lmp1[i].counter + 1) % 12; } a = r1.Next(3); this.ttball = new Tball(as12.MyPath[0].x, as12.MyPath[0].y, 0, 0, a); this.lmp1.Insert(this.lmp1.Count, ttball); }
public void AddTball(List_My_Ball MyBall, int start, int end) { for (int i = start; i < end; i++) { if (MyBall.lmp1[i].counter < as12.MyPath.Count) { MyBall.lmp1[i].counter++; } } if (MyBall.lmp1.Count < 6) { a = r1.Next(6); this.ttball = new Tball(as12.MyPath[0].x, as12.MyPath[0].y, 0, 0, a); MyBall.lmp1.Insert(MyBall.lmp1.Count, ttball); } }