Form_play.vb
(开头部分) 11KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
'[Visual Basic] Visual Basic Shooting Game
'made by - Printed Love
'Blog: https://printed.tistory.com
'YouTube: https://youtube.com/channel/UCtKTjiof6Mwa_4ffHDYyCbQ
Imports System.Math
Imports System.Threading
Public Class Form_play
'game control
Private timer_main As Thread
Private Sub Form_play_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Text = "Visual Basic Shooting Game"
FormBorderStyle = FormBorderStyle.FixedSingle
Width = S_WIDTH
Height = S_HEIGHT
BackColor = GRAY
AutoSizeMode = 0
FormBorderStyle = 1
player_rec = New Rectangle(S_WIDTH \ 2, S_HEIGHT \ 2, 25, 25)
'main timer thread
timer_main = New Thread(AddressOf TimerMain) With {
.IsBackground = True
}
End Sub
Private Sub Form_play_Shown(sender As Object, e As EventArgs) Handles Me.Shown
NewGame()
timer_main.Start()
Enabled = True
End Sub
Private Sub TimerMain()
Do
tick = DateTime.Now.Ticks 'current time tick
'game event every gametick
If tick > tick_recent + 333333 Then 'initialize every 0.03 Sec
tick_recent = tick
playtime_s = (tick_recent - tick_start) \ 10000000 'playtime count
playtime_m = playtime_s \ 60
playtime_s = playtime_s Mod 60
If gameTick < 32 Then
gameTick += 1
Else
gameTick = 0
End If
Application.DoEvents()
BackgroundControl()
ObjectControl()
PlayerControl()
Invoke(Sub() Me.Invalidate())
End If
'player attack
后面还有 278 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
