From 43a3434e97578d6cc8d7762ad3b70ab42e797e1e Mon Sep 17 00:00:00 2001 From: Trubkokrtek Date: Sun, 26 Apr 2026 10:12:48 +0200 Subject: [PATCH] GetSet station patch --- Assets/GameManager/Stations.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/GameManager/Stations.cs b/Assets/GameManager/Stations.cs index 374b425..f067b78 100644 --- a/Assets/GameManager/Stations.cs +++ b/Assets/GameManager/Stations.cs @@ -10,7 +10,7 @@ public class Station : IInteractable public PlayerRole? ReqRole { get; set; } public float InteractionRange { get; set; } protected GameObject interfaceInstance; - public GameObject Interface; // Prefab pro interakci (např. UI pro úkol nebo sabotáže) + public GameObject Interface { get; set; } // Prefab pro interakci (napø. UI pro Ăşkol nebo sabotáže) public virtual void Interact(PlayerRole role) { @@ -21,7 +21,7 @@ public class Station : IInteractable } else { - interfaceInstance = UnityEngine.Object.Instantiate(Interface); // Zobrazí interakční UI + interfaceInstance = UnityEngine.Object.Instantiate(Interface); // ZobrazĂ­ interakènĂ­ UI } @@ -34,7 +34,7 @@ public class Station : IInteractable } public class TaskStation : Station { - public string TaskID { get; set; } // Unikátní ID úkolu pro server + public string TaskID { get; set; } // UnikátnĂ­ ID Ăşkolu pro server private GameClient _gameClient; public TaskStation(Position pos, float interactionRange, GameClient gameClient, string taskID) : base(pos, interactionRange) { @@ -57,7 +57,7 @@ public class TaskStation : Station } private void ResumeTask() { - interfaceInstance.SetActive(true); // Zobrazí interakční UI + interfaceInstance.SetActive(true); // ZobrazĂ­ interakènĂ­ UI } private void OnTaskCompleted(ITask task) { @@ -69,12 +69,12 @@ public class TaskStation : Station { if (task.IsCompleted) { - UnityEngine.Object.Destroy(interfaceInstance); // Zničí interakční UI + UnityEngine.Object.Destroy(interfaceInstance); // Znièí interakènĂ­ UI Debug.Log($"Task {task.TaskName} completed and sent to server."); } else { - interfaceInstance.SetActive(false); // Skryje interakční UI + interfaceInstance.SetActive(false); // Skryje interakènĂ­ UI Debug.Log($"Task {task.TaskName} was not completed, but exited."); }