Đang chuẩn bị liên kết để tải về tài liệu:
microsoft visual basic game programming with directx phần 3

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tác giả của văn bản này cho thấy cách dễ dàng nó có thể được sản xuất trò chơi thú vị đa phương tiện bằng cách sử dụng quản lý DirectX 9,0 và lập trình với Visual Basic. NET Everett, các TheGameField mới nhất phiên bản ofshown mã trước các thành viên của nó (các thuộc tính và phương pháp) được định nghĩa giao diện Microsoft của Visual Studio. | NEW In Visual Basic .NET we don t have a parameter of the form Show method anymore to say if it IN should be shown modally the form is shown and execution continues after the form is closed or .NET modeless the form is shown and the code continues executing instead we have a showDialog method that should be used when we wish to show a form modally. In the preceding sample code the winConfig.Dispose line is only executed after the form is closed by the user. Coding for the Introduction Screen Now is a good time to create an intro screen for our game. Our suggestion is shown in the Figure 2-17 but feel free to use your artistic talent to improve it. Figure 2-17 The .Netterpillars splash screen TheMain procedure must be changed to reflect the workflow diagram created in the project phase Sub main Dim WinSplash As frmSplash Dim WinGameField As frmGameField Create the game engine object objGameEngine New clsGameEngine WinGameField.PicGameField.Handle WinSplash New frmSplash Do While WinSplash.ShowDialog DialogResult.OK WinGameField New frmGameField WinGameField.Show Application.DoEvents Shows the window immediately obj GameEngine.BackgroundImage WinGameField.PicGameField.Image.Clone Do While Not objGameEngine.GameOver obj GameEngine.Render Application.DoEvents Loop MsgBox Game Over MsgBoxStyle.Exclamation .Netterpillars WinGameField.Dispose Loop objGameEngine Nothing WinSplash.Dispose End Sub That s it. We can now play with different field sizes number of mushrooms and netterpillars. But after playing a couple of times we ll soon discover that when we run our game a second time without making any configuratio changes our properties don t get reset so among other things we ll start with the last quantity of mushrooms that is without the ones that were eaten . And worst of all If the game field screen is being created for each game our handle passed to the objGameEngine New method becomes invalid. Since we can t simply move the obj GameEngine creation to inside the loop .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.