Přidán build script, předělaná struktura, funkční spouštění serveru z clienta. Client je schopen fungovat po více her bez restartu. Bugfixy

This commit is contained in:
Perry 2026-03-21 21:23:33 +01:00
parent c942d23a87
commit 1a27dd6fab
22 changed files with 269 additions and 136 deletions

View file

@ -16,6 +16,10 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
protected override void Initialize() {
Exiting += (_, _) => {
Client.Disconnect();
};
// Client.Connect("127.0.0.1", 9012);
CommandManager.InitInputListeners();
@ -23,6 +27,7 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
base.Initialize();
Client.Init();
UIManager.InitUI();
UIManager.DisplayMainMenu();
}
@ -35,9 +40,9 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
}
protected override void Update(GameTime gameTime) {
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed ||
Keyboard.GetState().IsKeyDown(Keys.Escape))
if (Keyboard.GetState().IsKeyDown(Keys.Escape)){
Exit();
}
InputManager.NextInputCycle();
Screen.UpdateAll();
@ -59,4 +64,6 @@ public class GameMain() : Core("fnafkooo", 1280, 720, false) {
spriteBatch.End();
base.Draw(gameTime);
}
}