implemented new camera system.

This commit is contained in:
2019-02-06 12:47:44 -06:00
parent 2acdda2338
commit 0588cd0515
4 changed files with 57 additions and 12 deletions

View File

@@ -142,7 +142,6 @@ namespace RhythmBullet
screenManager.UpdateCurrentScreen(gameTime, CheckReadyForInitiate());
InputUtilities.Update();
Camera.Update();
base.Update(gameTime);
}
@@ -173,6 +172,7 @@ namespace RhythmBullet
private void PostResize()
{
graphics.ApplyChanges();
Camera.Apply();
screenManager.PostResize();
}

View File

@@ -39,6 +39,7 @@ namespace RhythmBullet.Screens.MainMenu
public override void ApplySize(int width, int height)
{
title.Scale = (width - 40) / title.Texture.Width;
title.CenterOrigin();
title.bounds.X = (int)(width / 2f);
title.bounds.Y = (int)(height / 2f);
@@ -47,12 +48,11 @@ namespace RhythmBullet.Screens.MainMenu
public override void Draw(SpriteBatch batch)
{
base.Draw(batch);
primitiveBatch.Begin(PrimitiveType.LineList);
primitiveBatch.AddVertex(new Vector2(20, 20), Color.Red);
primitiveBatch.AddVertex(new Vector2(50, 60), Color.Red);
primitiveBatch.End();
base.Draw(batch);
}
}
}