Renderování textu, jumpscary, win a lose screen

This commit is contained in:
Perry 2026-03-09 20:05:21 +01:00
parent 9bfe63a166
commit e6128dc9f5
21 changed files with 360 additions and 84 deletions

View file

@ -14,8 +14,6 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
// private GraphicsDeviceManager _graphics;
// private SpriteBatch _spriteBatch;
protected override void Initialize() {
Client.Connect("127.0.0.1", 9012);
CommandManager.InitInputListeners();
@ -29,7 +27,7 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
protected override void LoadContent() {
// spriteBatch = new SpriteBatch(GraphicsDevice);
// font = Content.Load<SpriteFont>("font");
}
protected override void Update(GameTime gameTime) {
@ -40,6 +38,7 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
// TODO: Add your update logic here
InputManager.NextInputCycle();
Screen.UpdateAll();
Client.Update();
base.Update(gameTime);
@ -49,7 +48,9 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
GraphicsDevice.Clear(Color.Black);
spriteBatch.Begin(samplerState:SamplerState.PointClamp);
Screen.CurrentScreen.Draw(spriteBatch);
Screen.DrawCurrentAndOverlay(spriteBatch);
// Screen.CurrentScreen.Draw(spriteBatch);
// spriteBatch.DrawString(font, "Elapsed time: " + gameTime.TotalGameTime.Milliseconds, new Vector2(10, 10), Color.White);
spriteBatch.End();
base.Draw(gameTime);