大神快来,我做到打地鼠游戏,为什么老鼠不会消失?
代码如下DimsXAsSingleDimsYAsSingleDimdsAsByteDimaAsIntegerDimtAsIntegerSubzb(X,Y)SelectCa...
代码如下
Dim sX As Single
Dim sY As Single
Dim ds As Byte
Dim a As Integer
Dim t As Integer
Sub zb(X, Y)
Select Case ds
Case 0, 1, 2
X = ds
Y = 0
Case 3, 4, 5
X = ds - 3
Y = 1
Case 6, 7, 8
X = ds - 6
Y = 2
End Select
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer2.Interval = 1000
t = 60
End Sub
Private Sub Command3_Click()
Timer2.Interval = 1000
Timer1.Interval = 700
End Sub
Private Sub d11_Click()
Shell "explorer.exe http://www.5654.com/"
End Sub
Private Sub d12_Click()
MsgBox "超级打地鼠是我们张匡宇超级无敌公司开发的第一款益智类游戏,十分好玩,版权归本公司所有.不得盗版,违者杀无赦,哈哈哈", vbInformation, "关于超级打地鼠"
End Sub
Private Sub d211_Click()
Timer1.Interval = 700
End Sub
Private Sub d212_Click()
Timer1.Interval = 500
End Sub
Private Sub d213_Click()
Timer1.Interval = 300
End Sub
Private Sub form_load()
Randomize
Print
For ds = 0 To 8
zb X, Y
PaintPicture Image2.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
Next
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Move X - Image1.Width / 2, Y - Image1.Height / 2
sX = Image1.Left
sY = Image1.Top
Label2.Caption = "加油,帅哥。最后的胜利是属于你的!"
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = Image3.Picture
xy = 9
If sX > 800 And sX < 1850 Then
If sY + 1500 > 1600 And sY + 1500 < 2350 Then xy = 0
If sY + 1500 > 2650 And sY + 1500 < 3400 Then xy = 3
If sY + 1500 > 3700 And sY + 1500 < 4450 Then xy = 6
End If 展开
Dim sX As Single
Dim sY As Single
Dim ds As Byte
Dim a As Integer
Dim t As Integer
Sub zb(X, Y)
Select Case ds
Case 0, 1, 2
X = ds
Y = 0
Case 3, 4, 5
X = ds - 3
Y = 1
Case 6, 7, 8
X = ds - 6
Y = 2
End Select
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
Timer2.Interval = 1000
t = 60
End Sub
Private Sub Command3_Click()
Timer2.Interval = 1000
Timer1.Interval = 700
End Sub
Private Sub d11_Click()
Shell "explorer.exe http://www.5654.com/"
End Sub
Private Sub d12_Click()
MsgBox "超级打地鼠是我们张匡宇超级无敌公司开发的第一款益智类游戏,十分好玩,版权归本公司所有.不得盗版,违者杀无赦,哈哈哈", vbInformation, "关于超级打地鼠"
End Sub
Private Sub d211_Click()
Timer1.Interval = 700
End Sub
Private Sub d212_Click()
Timer1.Interval = 500
End Sub
Private Sub d213_Click()
Timer1.Interval = 300
End Sub
Private Sub form_load()
Randomize
For ds = 0 To 8
zb X, Y
PaintPicture Image2.Picture, 1000 + 1050 * X, 1000 + 1050 * Y
Next
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Move X - Image1.Width / 2, Y - Image1.Height / 2
sX = Image1.Left
sY = Image1.Top
Label2.Caption = "加油,帅哥。最后的胜利是属于你的!"
End Sub
Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Picture = Image3.Picture
xy = 9
If sX > 800 And sX < 1850 Then
If sY + 1500 > 1600 And sY + 1500 < 2350 Then xy = 0
If sY + 1500 > 2650 And sY + 1500 < 3400 Then xy = 3
If sY + 1500 > 3700 And sY + 1500 < 4450 Then xy = 6
End If 展开
展开全部
我知道,但是你上一个回答还没处理呢。
我不想告诉你。
我不想告诉你。
追问
为什么
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
MouseDown 事件那有没有写‘老鼠’清理代码啊?
更多追问追答
追问
怎么写?
追答
就是检测鼠标点击的坐标有无‘地鼠’,有就清理该坐标的‘地鼠’,没有就直接退出过程
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
源码收下,走人
追问
码源没有上传完
追答
好吧,打酱油
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询