Maze Game With Scoring And Timers - VB Code Included! Final video of maze week, using a timer and scoring system to create a new more advanced maze game in visual basic! Previous videos: 1. K0g. 54. G.. 2. http: //www. VVo. 4e. Q.. code: Public Class Form. Dim score As Integer = 1. Calculations for soccer game: HELPPP NEEDED!!! I need to calculate how many match played, won, draw, scored, conceded, the top scorer and total points from a.Private Sub Form. Key. Down(sender As Object, e As Key. Event. Args) Handles My. Base. Key. Down If e. Key. Code = Keys. W Then Picture. Box. 1. Top = Picture. Box. 1. Top - 3 End If If e. Key. Code = Keys. A Then Picture. Box. 1. Left = Picture. Box. 1. Left - 3 End If If e. Key. Code = Keys. S Then Picture. Box. 1. Top = Picture. Box. 1. Top + 3 End If If e. Key. Code = Keys. D Then Picture. Box. 1. Left = Picture. Box. 1. Left + 3 End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 1. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 3. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 4. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. Just note, to make a game, you must know what happens without visual representation. Try to image what data must run before visual graphics can. This game. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 5. Bounds) Then Picture.
Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 6. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 7. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 8. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 9. Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 10.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 11.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 12.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 13.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 14.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 15.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 16.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 17.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 18.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Bounds. Intersects. With(Lbl. 19.Bounds) Then Picture. Box. 1. Top = 8. 4 Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. 20.Bounds) Then score = score - 1. Picture. Box. 1. Top = 8. Picture. Box. 1. Left = 1. End If If Picture. Box. 1. Bounds. Intersects. With(Lbl. Finish. Bounds) Then Timer. Stop() Msg. Box("Your Score Is: " & " " & score) End If End Sub Public Sub Form. Load(sender As Object, e As Event. Args) Handles My. Base. Load Timer. Start() End Sub Private Sub Timer. Tick(sender As Object, e As Event. Args) Handles Timer. Tick score = score - 1. Lbl. Score. Text = CStr(score) If score = 0 Then Timer. Stop() Msg. Box("you loose") End If End Sub.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2016
Categories |