implemented new camera system.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user