diff --git a/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteraction.cs b/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteraction.cs index 6c87be3..6b3f9cc 100644 --- a/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteraction.cs +++ b/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteraction.cs @@ -1,6 +1,6 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient; -public class UpdateInteraction : IUpdateData // при попытке взаимодействия с объектом +public class UpdateInteraction : UpdateData // при попытке взаимодействия с объектом { public int IdEntity { get; set; } public string UpdateType { get; set; } diff --git a/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteractionAvailable.cs b/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteractionAvailable.cs index 26471f5..3b7787b 100644 --- a/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteractionAvailable.cs +++ b/ZoFo/GameCore/GameManagers/NetworkManager/Updates/ServerToClient/UpdateInteractionAvailable.cs @@ -1,7 +1,7 @@ namespace ZoFo.GameCore.GameManagers.NetworkManager.Updates.ServerToClient; public class UpdateInteractionAvailable(int idEntity, bool isReady) - : IUpdateData // при изменении возможности повзаимодействовать с объектом + : UpdateData // при изменении возможности повзаимодействовать с объектом { public int IdEntity { get; set; } = idEntity; public string UpdateType { get; set; } diff --git a/ZoFo/GameCore/GameObjects/GameObject.cs b/ZoFo/GameCore/GameObjects/GameObject.cs index 01dce1b..4847052 100644 --- a/ZoFo/GameCore/GameObjects/GameObject.cs +++ b/ZoFo/GameCore/GameObjects/GameObject.cs @@ -12,7 +12,6 @@ public abstract class GameObject { public Vector2 position; - private Server server; public Vector2 rotation; //вектор направления объекта public abstract GraphicsComponent graphicsComponent { get; } @@ -20,8 +19,7 @@ public abstract class GameObject public GameObject(Vector2 position) { this.position = position; - server = new Server(); - server.RegisterGameObject(this); + AppManager.Instance.server.RegisterGameObject(this); graphicsComponent.LoadContent(); }