一、用VB 6.0編個射擊游戲,急求源代碼。
%e6%ba%90%e7%a0%81
二、VB程序設計簡單空戰游戲,求助大神!!!
1 在設計窗體上右鍵點image控件,選復制。
2 在窗體空白處點右鍵,選粘貼,問是否創建控件組,選是,控件組就建立了,可以看到最先的image1名稱變成image1(0) 。刪除掉剛剛粘貼的image1(1)
3 在程序中可以用load image1(index)來創建一個新的image1,用unload image(index)來刪除
三、跪求vb設計的射擊小游戲需要源代碼以及工程,謝謝啊!
VBA版打氣球小游戲,拿去用吧
四、VB打靶程序
Option Explicit
'使用的度量單位為默認的“緹”
'用到的控件:
'Label1 標簽控件, 屬性: Caption=
'Command1 開始按鈕, 屬性: Caption=開始 , Enable=True
'Command2 暫停按鈕, 屬性: Caption=暫停 , Enable=False
'Command3 重置按鈕, 屬性: Caption=重置 , Enable=False
'Command4 結束按鈕, 屬性: Caption=結束 , Enable=True
'Timer1 定時器, 屬性: Interval=1000, Enable=False
Dim score As Integer '得分
Dim cx As Long, cy As Long '圓心坐標
Dim px As Long, py As Long '點擊坐標
Dim Going As Boolean '游戲進行標志
Private Sub DrawCircle()
'畫同心圓
Dim i As Integer, r As Integer, g As Integer, b As Integer, c As Long
Randomize
'更新圓心坐標:400和250要根據窗口大小適度調整
cx = Int(Rnd * 400 + 60) * Screen.TwipsPerPixelX
cy = Int(Rnd * 250 + 60) * Screen.TwipsPerPixelY
Cls
DrawWidth = 3
'畫同心圓
For i = 7 To 1 Step -1
r = Int(Rnd * 256): g = Int(Rnd * 256): b = Int(Rnd * 256)
c = RGB(r, g, b)
FillColor = c
Circle (cx, cy), i * 8 * Screen.TwipsPerPixelX, &H80888888
Next
End Sub
Private Sub Command1_Click()
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = True
Going = True
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
If Going Then
Command2.Caption = 繼續
Else
Command2.Caption = 暫停
End If
Going = Not Going
Timer1.Enabled = Going
End Sub
Private Sub Command3_Click()
Command1.Enabled = True
Command2.Enabled = False
Command2.Caption = 暫停
Command3.Enabled = False
Cls
score = 0
Label1 = 0
Going = False
Timer1.Enabled = Going
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Click()
If Going Then
If ScaleX(Sqr((px - cx) ^ 2 + (py - cy) ^ 2), vbTwips, vbPixels) <= 100 Then
score = score + 1
Label1 = score
End If
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
px = X: py = Y '鼠標位置
End Sub
Private Sub Timer1_Timer()
If Going Then DrawCircle '每秒更新一次同心圓位置
End Sub
