⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmerikstarship.frm

📁 用vb编写的射击游戏
💻 FRM
字号:
VERSION 5.00
Begin VB.Form starship 
   BackColor       =   &H80000007&
   Caption         =   "Welcome to ErikStarship"
   ClientHeight    =   14325
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   17190
   LinkTopic       =   "Form1"
   ScaleHeight     =   14325
   ScaleWidth      =   17190
   StartUpPosition =   2  'CenterScreen
   Begin VB.Timer enemydead 
      Interval        =   1
      Left            =   0
      Top             =   8760
   End
   Begin VB.Timer Timer2 
      Interval        =   1
      Left            =   0
      Top             =   9480
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   10
      Left            =   0
      Top             =   9120
   End
   Begin VB.Image Friendlytorp 
      Height          =   495
      Left            =   2520
      Stretch         =   -1  'True
      Top             =   6840
      Width           =   495
   End
   Begin VB.Image enemy1 
      Height          =   1095
      Left            =   7800
      Top             =   0
      Width           =   1215
   End
   Begin VB.Image imgstarship 
      Height          =   1335
      Left            =   7200
      Top             =   12840
      Width           =   1335
   End
End
Attribute VB_Name = "starship"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub enemydead_Timer()

If (Friendlytorp.Left + Friendlytorp.Width >= enemy1.Left) And (Friendlytorp.Left <= enemy1.Left + enemy1.Width) And Friendlytorp.Top <= enemy1.Top + enemy1.Height And Friendlytorp.Top + Friendlytorp.Height >= enemy1.Top Then
Friendlytorp.Visible = False
   
enemyappear
End If
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    '
    If KeyCode = vbKeyUp Then Moveup
    If KeyCode = vbKeyDown Then Movedown
    If KeyCode = vbKeyLeft Then MoveLeft
    If KeyCode = vbKeyRight Then MoveRight
    If KeyCode = vbKeySpace Then goodtorp

End Sub


Private Sub Form_Load()
imgstarship.Picture = Images.Image1.Picture
enemy1.Picture = Images.Image2.Picture
Randomize
enemyappear
MsgBox "Welcome to ErikStarship!"
Timer1.Enabled = False
Friendlytorp.Visible = False
Friendlytorp.Picture = Images.Image3.Picture
End Sub

Private Sub Image1_Click()

End Sub

Private Sub Timer1_Timer()

If Friendlytorp.Picture = Images.Image4.Picture Then
Friendlytorp.Picture = Images.Image3.Picture
Else
Friendlytorp.Picture = Images.Image4.Picture
End If

Friendlytorp.Top = Friendlytorp.Top - 250

If Friendlytorp.Top <= 0 Then
Friendlytorp.Visible = False
Friendlytorp.Top = imgstarship.Top
Me.Enabled = False
End If



End Sub

Private Sub Timer2_Timer()
If Friendlytorp.Top = imgstarship.Top Then
Friendlytorp.Left = imgstarship.Left + 950
End If

End Sub

Private Sub Timer3_Timer()

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -