原先的程序是第一个球碰撞第二个球以后第二个球开始运动,现在要改成第一个球距离第二个球一段距离后,第二个球开始运动。dim flag,num,n as integer dim mode as integer Dim R1,R2 As Integer dim trigger as integer R1 = c。
GetAttrib("R1") R2 = c。GetAttrib("R2") Dim number,block,move,left_right As String number=c。GetAttrib("number") block=c。
GetAttrib("block") move=c。GetAttrib("move") left_right=c。GetAttrib("left_right") trigger=c。GetAttrib("trigger")dim distance1, distance2 distance3 as integer distance1 = 330 distance3 =c。
GetAttrib("distance3") distance2=distance1-distance3dim vb1, vb2,va1,va2,v as integer vb1 = CInt(c。GetAttrib("vb1")) vb2 = CInt(c。
GetAttrib("vb2")) va1 = CInt(c。GetAttrib("va1")) va2 = CInt(c。GetAttrib("va2"))dim t1, t2, t as integerdim pointX(2),pointY(2) as integerdim x1,y1,x2,y2,pointY2,dx1,dy1,dx2,dy2 as integer if(left_right=1) then t1=distance2/(abs(vb1)+abs(vb2)) t2=CInt(c。
GetAttrib("t2")) x2=Random(400,460) end if if x2>=400 then x1=x2-distance1-distence3-R1-R2 end if y1= Display。YRes/2 y2=y1 if(left_right=0) then t1=distance1/(abs(vb1)+abs(vb2)) t2=CInt(c。
GetAttrib("t2")) x2=Random(340,400) end if if x2< 400 then x1=x2+distance1+R1+R2 end if y1= Display。YRes/2 y2=y1。