Skip to content

Commit 8121e76

Browse files
Merge pull request #45 from tgc-utn/new-logo-and-screen-size
QOL changes and logo update
2 parents b942d1d + 8b4aa04 commit 8121e76

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:fdbf27e227a1554da9653bee09022aa6d72978a971c6390f631e3e4c75c98cfe
3-
size 386333
2+
oid sha256:af84a6d4a433db8f49c3895d534e37aacddf68b27f9611856e76a6052562fe3f
3+
size 4751036

TGC.MonoGame.TP/TGCGame.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public TGCGame()
2626
{
2727
// Maneja la configuracion y la administracion del dispositivo grafico.
2828
Graphics = new GraphicsDeviceManager(this);
29+
30+
Graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width - 100;
31+
Graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height - 100;
32+
2933
// Para que el juego sea pantalla completa se puede usar Graphics IsFullScreen.
3034
// Carpeta raiz donde va a estar toda la Media.
3135
Content.RootDirectory = "Content";
@@ -113,10 +117,12 @@ protected override void Update(GameTime gameTime)
113117
//Salgo del juego.
114118
Exit();
115119
}
116-
120+
117121
// Basado en el tiempo que paso se va generando una rotacion.
118122
Rotation += Convert.ToSingle(gameTime.ElapsedGameTime.TotalSeconds);
119123

124+
World = Matrix.CreateRotationY(Rotation);
125+
120126
base.Update(gameTime);
121127
}
122128

@@ -133,12 +139,10 @@ protected override void Draw(GameTime gameTime)
133139
Effect.Parameters["View"].SetValue(View);
134140
Effect.Parameters["Projection"].SetValue(Projection);
135141
Effect.Parameters["DiffuseColor"].SetValue(Color.DarkBlue.ToVector3());
136-
var rotationMatrix = Matrix.CreateRotationY(Rotation);
137142

138143
foreach (var mesh in Model.Meshes)
139144
{
140-
World = mesh.ParentBone.Transform * rotationMatrix;
141-
Effect.Parameters["World"].SetValue(World);
145+
Effect.Parameters["World"].SetValue(mesh.ParentBone.Transform * World);
142146
mesh.Draw();
143147
}
144148
}

0 commit comments

Comments
 (0)