终于圆满结束了
Dim 辐射值, 叠加值, 进度条长度
Dim tmp
tmp = false
进度条长度 = form1.进度条.Width
TracePrint 进度条长度
叠加值=0
Randomize
Do
Delay 20
辐射值 = Int((500 - 1 + 1) * Rnd + 1)
TracePrint 辐射值
If 辐射值 < 100 Then
TracePrint "辐射了。。。。。。"
叠加值=叠加值+辐射值
TracePrint"叠加值"&叠加值
form1.标签提示.Caption = 叠加值
form1.进度条.Value = 100 / 10000 * 叠加值
If tmp Then
tmp=猫在动(-1,0)
Else
tmp=猫在动(0,-1)
End If
End If
If 叠加值 > 10000 Then
TracePrint "已大于10000"
form1.标签提示.Caption = "game over"
form1.PictureBox3.Visible = true
Exit Do
End If
Loop
Function 猫在动(m1,m2)
form1.PictureBox1.Visible=m1
form1.PictureBox2.Visible = m2
If tmp Then
form1.PictureBox1.left = 进度条长度 / 10000 * 叠加值
猫在动 = False
Else
form1.PictureBox2.left = 进度条长度 / 10000 * 叠加值
猫在动=True
End If
// form1.PictureBox1.Visible=False
// form1.PictureBox2.Visible = True
// form1.PictureBox2.left = 进度条长度 / 10000 * 叠加值
// tmp=True
End Function
//Sub 猫1动()
//
//End Sub
//Sub 猫2动()
//
//End Sub