Skip to content

Commit

Permalink
Merge pull request #45 from tgc-utn/new-logo-and-screen-size
Browse files Browse the repository at this point in the history
QOL changes and logo update
  • Loading branch information
Javier-Rotelli authored Apr 9, 2024
2 parents b942d1d + 8b4aa04 commit 8121e76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions TGC.MonoGame.TP/Content/Models/tgc-logo/tgc-logo.fbx
Git LFS file not shown
12 changes: 8 additions & 4 deletions TGC.MonoGame.TP/TGCGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ public TGCGame()
{
// Maneja la configuracion y la administracion del dispositivo grafico.
Graphics = new GraphicsDeviceManager(this);

Graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width - 100;
Graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height - 100;

// Para que el juego sea pantalla completa se puede usar Graphics IsFullScreen.
// Carpeta raiz donde va a estar toda la Media.
Content.RootDirectory = "Content";
Expand Down Expand Up @@ -113,10 +117,12 @@ protected override void Update(GameTime gameTime)
//Salgo del juego.
Exit();
}

// Basado en el tiempo que paso se va generando una rotacion.
Rotation += Convert.ToSingle(gameTime.ElapsedGameTime.TotalSeconds);

World = Matrix.CreateRotationY(Rotation);

base.Update(gameTime);
}

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

foreach (var mesh in Model.Meshes)
{
World = mesh.ParentBone.Transform * rotationMatrix;
Effect.Parameters["World"].SetValue(World);
Effect.Parameters["World"].SetValue(mesh.ParentBone.Transform * World);
mesh.Draw();
}
}
Expand Down

0 comments on commit 8121e76

Please sign in to comment.