diff --git a/ZoFo/GameCore/Client.cs b/ZoFo/GameCore/Client.cs index f6dcd1e..0133d65 100644 --- a/ZoFo/GameCore/Client.cs +++ b/ZoFo/GameCore/Client.cs @@ -316,10 +316,11 @@ namespace ZoFo.GameCore (ent as Player).rad = (update as UpdatePlayerParametrs).radiatoin; } } - + public bool changeGUI = false; public void GameEnd() { - AppManager.Instance.SetGUI(new FinishingGUI()); + + changeGUI = true; } public Entity FindEntityById(int id) diff --git a/ZoFo/GameCore/GameManagers/AppManager.cs b/ZoFo/GameCore/GameManagers/AppManager.cs index 1f657cd..bbe1b66 100644 --- a/ZoFo/GameCore/GameManagers/AppManager.cs +++ b/ZoFo/GameCore/GameManagers/AppManager.cs @@ -127,7 +127,14 @@ namespace ZoFo.GameCore.GameManagers default: break; } - + if (client != null) + { + if (client.changeGUI) + { + SetGUI(new FinishingGUI()); + client.changeGUI = false; + } + } base.Update(gameTime); } diff --git a/ZoFo/GameCore/GameObjects/GameObject.cs b/ZoFo/GameCore/GameObjects/GameObject.cs index b94b084..1a5c1f9 100644 --- a/ZoFo/GameCore/GameObjects/GameObject.cs +++ b/ZoFo/GameCore/GameObjects/GameObject.cs @@ -103,6 +103,7 @@ public abstract class GameObject } public void DrawDebugRectangle(SpriteBatch spriteBatch, Rectangle _rectangle, Nullable color = null) { + return; if (color is null) color = new Color(1, 0, 0, 0.1f); if (color.Value.A == 255) color = new Color(color.Value, 0.25f); spriteBatch.Draw(debugTexture, diff --git a/ZoFo/GameCore/Server.cs b/ZoFo/GameCore/Server.cs index d0108ec..a032167 100644 --- a/ZoFo/GameCore/Server.cs +++ b/ZoFo/GameCore/Server.cs @@ -138,7 +138,7 @@ namespace ZoFo.GameCore //AppManager.Instance.server.RegisterGameObject(new EntittyForAnimationTests(new Vector2(0, 0))); for (int i = 0; i < networkManager.clientsEP.Count; i++) { - Player player = new Player(new Vector2(760 - 30 * i, 140)); + Player player = new Player(new Vector2(-800 - 30 * i, 750)); RegisterGameObject(player); networkManager.AddData(new UpdateCreatePlayer() { PlayerId = i+1, IdEntity=player.Id}); }