简单的VB射击游戏源码

来源:百度知道 编辑:UC知道 时间:2024/09/20 18:34:40
刚开始学VB2008 想让大家帮忙写一个射击游戏
要求 玩家可以调整一支枪(或者炮也行)的角度 射击一个每隔一段时间就变化位置的靶子 每次射击我们把子弹(或者炮弹)的(抛物线)路线显示出来 三次没打中就算输了 然后就是计分。
很简单吧 高手来拿分吧
我需要源码 加上注释 (我真的是初学 很菜鸟很菜鸟 所以注释请尽量清楚)
发到邮箱给我也可以 arianelee@yahoo.com.cn

在窗体中添加一timer1,shape1控件
添加代码:
Dim n As Integer, m As Integer
Private Sub Form_Load()
Timer1.Interval = 1000
Shape1.Shape = 3
n = Shape1.Left
m = Shape1.Top
End Sub

Private Sub Timer1_Timer()
Shape1.Left = Shape1.Left + 200
Shape1.Top = Shape1.Top - 100
If Shape1.Left >= Form1.Width Or Shape1.Top <= 0 Then
Shape1.Left = n
Shape1.Top = m
End If
End Sub

Private Sub Timer1_Timer()
Shape1.Left = Shape1.Left + 200
Shape1.Top = Shape1.Top - 100
If Shape1.Left >= Form1.Width Or Shape1.Top <= 0 Then
Shape1.Left = n
Shape1.Top = m
End If
End Sub