📄 creat_module_type_color.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "creat_module_type_color"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'产生方块类型和颜色
Private mdltype_memory(51) As mdltype
'对象启动时为产生方块类型,颜色类型存储赋值
Private Sub Class_Initialize()
Dim i As Integer
For i = 0 To 51
mdltype_memory(i).module_type = Int(Rnd * 20)
If mdltype_memory(i).module_type < 1 Then
mdltype_memory(i).module_type = 1
End If
mdltype_memory(i).color_type = Int(Rnd * 8)
If mdltype_memory(i).color_type < 1 Then
mdltype_memory(i).color_type = 1
End If
Next i
End Sub
'获得方块类型和颜色
Public Function get_mdltype_typevalue(i As Integer)
get_mdltype_typevalue = mdltype_memory(i).module_type
End Function
'获得方块颜色
Public Function get_mdltype_colortypevalue(i As Integer)
get_mdltype_colortypevalue = mdltype_memory(i).color_type
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -