Page 1 of 1

Lock This Thread

Posted: Mon Jan 26, 2009 3:51 pm
by CrimsonNuker
I just wanted to show somebody something:

Public Class frmLastLevel
Dim intMongrelX As Integer
Dim intMongrelY As Integer
Dim intMongrelHP As Integer = 100
Private Sub frmLastLevel_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Randomize()
tmrMongrel.Start()
End Sub

Private Sub trmMongrel_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrMongrel.Tick
intMongrelX = (Rnd() * 600) + 1
intMongrelY = (Rnd() * 500) + 1
picMongrel.Location = New System.Drawing.Point(intMongrelX, intMongrelY)
End Sub

Private Sub picMongrel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picMongrel.Click
lblHP.Text = intMongrelHP
intMongrelHP = intMongrelHP - 5
If intMongrelHP = 50 Then
My.Computer.Audio.Play(My.Resources.trap, AudioPlayMode.WaitToComplete)
picTrap.Visible = True
ElseIf intMongrelHP = 45 Then
picTrap.Visible = False
picMongrel.Visible = False
tmrMongrel.Stop()
picObama.Visible = True
tmrObama.Start()
End If
End Sub

Private Sub tmrObama_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrObama.Tick
intMongrelX = (Rnd() * 600) + 1
intMongrelY = (Rnd() * 500) + 1
picObama.Location = New System.Drawing.Point(intMongrelX, intMongrelY)
picTreasure.Location = New System.Drawing.Point(intMongrelX, intMongrelY)
End Sub

Private Sub picObama_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picObama.Click
lblHP.Text = intMongrelHP
intMongrelHP = intMongrelHP - 5
If intMongrelHP = 0 Then
tmrObama.Stop()
lblHP.Text = "0"
MsgBox("You have killed the mongrel, now click on the treasure box to get your face back!")
picObama.Visible = False
picTreasure.Visible = True
End If
End Sub

Private Sub picTreasure_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picTreasure.Click
picYou.Visible = False
picYouComplete.Visible = True
picContinue.Visible = True
End Sub
End Class

Re: Lock This Thread

Posted: Mon Jan 26, 2009 3:52 pm
by Tasdik
PM ftw.