File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
version https://git-lfs.github.com/spec/v1
2
- oid sha256:fdbf27e227a1554da9653bee09022aa6d72978a971c6390f631e3e4c75c98cfe
3
- size 386333
2
+ oid sha256:af84a6d4a433db8f49c3895d534e37aacddf68b27f9611856e76a6052562fe3f
3
+ size 4751036
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ public TGCGame()
26
26
{
27
27
// Maneja la configuracion y la administracion del dispositivo grafico.
28
28
Graphics = new GraphicsDeviceManager ( this ) ;
29
+
30
+ Graphics . PreferredBackBufferWidth = GraphicsAdapter . DefaultAdapter . CurrentDisplayMode . Width - 100 ;
31
+ Graphics . PreferredBackBufferHeight = GraphicsAdapter . DefaultAdapter . CurrentDisplayMode . Height - 100 ;
32
+
29
33
// Para que el juego sea pantalla completa se puede usar Graphics IsFullScreen.
30
34
// Carpeta raiz donde va a estar toda la Media.
31
35
Content . RootDirectory = "Content" ;
@@ -113,10 +117,12 @@ protected override void Update(GameTime gameTime)
113
117
//Salgo del juego.
114
118
Exit ( ) ;
115
119
}
116
-
120
+
117
121
// Basado en el tiempo que paso se va generando una rotacion.
118
122
Rotation += Convert . ToSingle ( gameTime . ElapsedGameTime . TotalSeconds ) ;
119
123
124
+ World = Matrix . CreateRotationY ( Rotation ) ;
125
+
120
126
base . Update ( gameTime ) ;
121
127
}
122
128
@@ -133,12 +139,10 @@ protected override void Draw(GameTime gameTime)
133
139
Effect . Parameters [ "View" ] . SetValue ( View ) ;
134
140
Effect . Parameters [ "Projection" ] . SetValue ( Projection ) ;
135
141
Effect . Parameters [ "DiffuseColor" ] . SetValue ( Color . DarkBlue . ToVector3 ( ) ) ;
136
- var rotationMatrix = Matrix . CreateRotationY ( Rotation ) ;
137
142
138
143
foreach ( var mesh in Model . Meshes )
139
144
{
140
- World = mesh . ParentBone . Transform * rotationMatrix ;
141
- Effect . Parameters [ "World" ] . SetValue ( World ) ;
145
+ Effect . Parameters [ "World" ] . SetValue ( mesh . ParentBone . Transform * World ) ;
142
146
mesh . Draw ( ) ;
143
147
}
144
148
}
You can’t perform that action at this time.
0 commit comments