vb 俄罗斯方块怎么样编写积分功能
这个是本vb游戏编码中判断是否消层的代码,请问高手如何加上一段代码使得该游戏能在没消去一层时,在积分器上加上100分!SubJudge_Full()'判断是否堆满R_Va...
这个是本vb游戏编码中判断是否消层的代码,请问高手如何加上一段代码使得该游戏能在没消去一层时,在积分器上加上100分!
Sub Judge_Full()
'判断是否堆满
R_Value = picPictureNow.Top + 1 'MinY
rx_value = picPictureNow.Top + picPictureNow.Height 'MaxY
For i = rx_value To R_Value Step -1
If Total(1, i) And Total(2, i) And Total(3, i) _
And Total(4, i) And Total(5, i) And _
Total(6, i) And Total(7, i) And Total(8, i) _
And Total(9, i) And Total(10, i) Then
'如果一行已经堆满,则将此行上面的图象全部向下移动一点
k = BitBlt(picBackGround.hDC, 0, 20, 200, _
(i - 1) * 20, picBackGround.hDC, 0, 0, vbSrcCopy)
For j = i To 1 Step -1
For k = 1 To 10
Total(k, j) = Total(k, j - 1)
Next k
Next j
i = i + 1
End If
Next i
能详细点么 我菜鸟 试了 加上之后不能累加分数 ! 积分框里只有当次消下的分数!
Sub Judge_Full()
'判断是否堆满
Dim count As Integer
R_Value = picPictureNow.Top + 1 'MinY
rx_value = picPictureNow.Top + picPictureNow.Height 'MaxY
For i = rx_value To R_Value Step -1
If Total(1, i) And Total(2, i) And Total(3, i) _
And Total(4, i) And Total(5, i) And _
Total(6, i) And Total(7, i) And Total(8, i) _
And Total(9, i) And Total(10, i) Then
'如果一行已经堆满,则将此行上面的图象全部向下移动一点
count = count + 1
score1 = score1 + count * 100
score = Str$(score1)
txt1.Text = score
下略 展开
Sub Judge_Full()
'判断是否堆满
R_Value = picPictureNow.Top + 1 'MinY
rx_value = picPictureNow.Top + picPictureNow.Height 'MaxY
For i = rx_value To R_Value Step -1
If Total(1, i) And Total(2, i) And Total(3, i) _
And Total(4, i) And Total(5, i) And _
Total(6, i) And Total(7, i) And Total(8, i) _
And Total(9, i) And Total(10, i) Then
'如果一行已经堆满,则将此行上面的图象全部向下移动一点
k = BitBlt(picBackGround.hDC, 0, 20, 200, _
(i - 1) * 20, picBackGround.hDC, 0, 0, vbSrcCopy)
For j = i To 1 Step -1
For k = 1 To 10
Total(k, j) = Total(k, j - 1)
Next k
Next j
i = i + 1
End If
Next i
能详细点么 我菜鸟 试了 加上之后不能累加分数 ! 积分框里只有当次消下的分数!
Sub Judge_Full()
'判断是否堆满
Dim count As Integer
R_Value = picPictureNow.Top + 1 'MinY
rx_value = picPictureNow.Top + picPictureNow.Height 'MaxY
For i = rx_value To R_Value Step -1
If Total(1, i) And Total(2, i) And Total(3, i) _
And Total(4, i) And Total(5, i) And _
Total(6, i) And Total(7, i) And Total(8, i) _
And Total(9, i) And Total(10, i) Then
'如果一行已经堆满,则将此行上面的图象全部向下移动一点
count = count + 1
score1 = score1 + count * 100
score = Str$(score1)
txt1.Text = score
下略 展开
2个回答
展开全部
'如果一行已经堆满,则将此行上面的图象全部向下移动一点
Score=Score+100
Score=Score+100
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询