
左
then
'
向左运动
x1=x1+1
end
if
if
右
then
'
向右运动
x1=x1-1
end
if
if
上
then
'
向上运动
y1=y1+1
'
使用自定义
坐标系统
有统一的坐标转换过程
end
if
if
下
then
'
向下运动
y1=y1-1
end
if
''达到最大边界后判断处理过程,回原始位置再来
还是
向反方向走
''
我只会左右反d球。 S1是ShapePrivate Sub Timer1_Timer()
Static s
If S1.Left >= Form1.Width - S1.Width And s = 2 Then s = 0
If S1.Left <= 0 And s = 0 Then s = 2
If s = 0 Then S1.Left = S1.Left - 100
If s = 2 Then S1.Left = S1.Left + 100
End Sub
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)