Game Development Reference
In-Depth Information
Private Sub FighterRadio_CheckedChanged(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles FighterRadio.CheckedChanged
If FighterRadio.Checked Then
dieSize = 10
Call ComputeHitPoints()
End If
End Sub
That code takes care of all of the user interface events our code will need to
handle. Let us see how well it works.
From the Visual Basic main menu, select Debug?Start Debugging or press F5.
You should see something like Figure 1.6. Note that the application changed
the value of 888 to 4 as expected. You can stop debugging by clicking the Close
button (the red button with an inside) in the upper-right corner of the
application window or by selecting Stop Debugging from the Visual Basic Debug
menu.
We can tell at a glance that our code does not wake up sane. It shows no class
selection, and 888 is probably not the right number of hits points for a first level
character of any class. At least the Level control is sane. Click one of the radio
Figure 1.6
The project, running for the first time.
 
Search Nedrilad ::




Custom Search