Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QOL changes and logo update #45

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading