Private n(3), m(3) As Integer ‘n(3)记录游戏区的四个活动方块的编号
‘m(3)记录预览区的四个活动方块的编号
Private situation, situation2, linenum, t As Integer ‘situation记录游戏区的方块样式
‘situation2记录预览区的方块样式
‘linenum记录一次消除的行数
Private Sub hidefang(a As Integer) ‘定义使方块不可见的过程
Select Case a
Case 0 ‘a=0使游戏区方块不可见
cmdfang(n(0)).Visible = False
cmdfang(n(1)).Visible = False
cmdfang(n(2)).Visible = False
cmdfang(n(3)).Visible = False
Case 1 ‘a=1使预览区方块不可见
cmdfangnext(m(0)).Visible = False
cmdfangnext(m(1)).Visible = False
cmdfangnext(m(2)).Visible = False
cmdfangnext(m(3)).Visible = False
End Select
End Sub
Private Sub showfang(a As Integer) ‘定义使方块可见的过程
Select Case a
Case 0 ‘a=0使游戏区方块可见
cmdfang(n(0)).Visible = True
cmdfang(n(1)).Visible = True
cmdfang(n(2)).Visible = True
cmdfang(n(3)).Visible = True
Case 1 ‘a=1使预览区方块不可见
cmdfangnext(m(0)).Visible = True
cmdfangnext(m(1)).Visible = True
cmdfangnext(m(2)).Visible = True
cmdfangnext(m(3)).Visible = True
End Select
End Sub
Private Sub clearline() ‘定义消除整行的过程
For i = 190 To 10 Step -10
If cmdfang(i).Visible = True And _
cmdfang(i + 1).Visible = True And _
cmdfang(i + 2).Visible = True And _
cmdfang(i + 3).Visible = True And _
cmdfang(i + 4).Visible = True And _
cmdfang(i + 5).Visible = True And _
cmdfang(i + 6).Visible = True And _
cmdfang(i + 7).Visible = True And _
cmdfang(i + 8).Visible = True And _
cmdfang(i + 9).Visible = True Then
For j = i + 4 To i Step -1
t = 1
cmdfang(j).Visible = False
cmdfang(2 * i + 9 – j).Visible = False
For k = 1 To 4000
DoEvents
Next
t = 0
Next
linenum = linenum + 1
For j = i – 1 To 0 Step -1
If cmdfang(j).Visible = True Then
cmdfang(j).Visible = False
cmdfang(j + 10).Visible = True
End If
Next
clearline ‘为了实现连消数行俄罗斯方块小游戏,这里使用递归调用
End If
Next
End Sub
1.《俄罗斯方块小游戏;我想用VB6.0做一个小游戏(俄罗斯方块即可)。哪位高手能提供以下数据》援引自互联网,旨在传递更多网络信息知识,仅代表作者本人观点,与本网站无关,侵删请联系页脚下方联系方式。
2.《俄罗斯方块小游戏;我想用VB6.0做一个小游戏(俄罗斯方块即可)。哪位高手能提供以下数据》仅供读者参考,本网站未对该内容进行证实,对其原创性、真实性、完整性、及时性不作任何保证。
3.文章转载时请保留本站内容来源地址,https://www.cxvn.com/news/91333.html