Microsoft.Xna.Framework and Microsoft.Xna.Framework.Game. Both should be in the GAC.Module Program4) Add a class named Game.vb.
Sub Main()
Using game As New Game
game.Run()
End Using
End Sub
End Module
Imports Microsoft.Xna.Framework
Imports Microsoft.Xna.Framework.Audio
Imports Microsoft.Xna.Framework.Components
Imports Microsoft.Xna.Framework.Graphics
Imports Microsoft.Xna.Framework.Input
Imports Microsoft.Xna.Framework.Storage
Public Class Game
Inherits Microsoft.Xna.Framework.Game
Dim graphics As Components.GraphicsComponent
Private Sub InitializeComponent()
graphics = New Components.GraphicsComponent
GameComponents.Add(graphics)
End Sub
Public Sub New()
InitializeComponent()
End Sub
Protected Overrides Sub Update()
' The time since Update was called last
Dim elapsed As Double = ElapsedTime.TotalSeconds
' TODO: Add your game logic here
' Let the GameComponents update
UpdateComponents()
End Sub
Protected Overrides Sub Draw()
If Not graphics.EnsureDevice Then Return
graphics.GraphicsDevice.Clear(Color.CornflowerBlue)
graphics.GraphicsDevice.BeginScene()
' TODO: Add your drawing code here
' Let the GameComponents draw
DrawComponents()
graphics.GraphicsDevice.EndScene()
graphics.GraphicsDevice.Present()
End Sub
End Class
posted by Michael Russell at
8/30/2006 11:25:00 AM
![]()
1 Comments:
I haven't jumped on the XNA Express bandwagon yet, but judging from the vb code, it looks like all you have to write is some graphics code and game logic code. Couldn't be that bad, I say!
How robust are the XNA libraries?
Post a Comment
Links to this post:
Create a Link
<< Home