From d2e3adbaccefbb4289592f88bd558c1851d143d1 Mon Sep 17 00:00:00 2001 From: gravitrax-bublina <113550273+gravitrax-bublina@users.noreply.github.com> Date: Sun, 17 May 2026 12:07:41 +0200 Subject: [PATCH] Adapt Happy Wheel to shared ITask from main --- Assets/GameManager/ITask.cs | 21 ++++++++++++++ Assets/TimingWheelShooter.cs | 28 ++++++++++++++++--- ...{New Material 2.mat => bramboracolor1.mat} | 2 +- ...{New Material 1.mat => bramboracolor2.mat} | 2 +- Assets/{glasss.mat => diamant.mat} | 2 +- Assets/itask.cs | 20 ------------- Assets/{New Material.mat => sklo.mat} | 2 +- 7 files changed, 49 insertions(+), 28 deletions(-) create mode 100644 Assets/GameManager/ITask.cs rename Assets/{New Material 2.mat => bramboracolor1.mat} (99%) rename Assets/{New Material 1.mat => bramboracolor2.mat} (99%) rename Assets/{glasss.mat => diamant.mat} (99%) delete mode 100644 Assets/itask.cs rename Assets/{New Material.mat => sklo.mat} (99%) diff --git a/Assets/GameManager/ITask.cs b/Assets/GameManager/ITask.cs new file mode 100644 index 0000000..d38cd2c --- /dev/null +++ b/Assets/GameManager/ITask.cs @@ -0,0 +1,21 @@ +//using GeoSus.Client; +using System; +using UnityEngine; + +public enum TaskType +{ + Task +} + +public interface ITask +{ + public string TaskID { get; set; } // Unikátní ID úkolu pro server + public TaskType TaskType { get; set; } // Typ úkolu + public string TaskName { get; set; } // Viditelný název úkolu + public (double, double) TaskLocation { get; set; } // Poloha na mapě + public bool IsCompleted { get; } // Stav dokončení úkolu + + void Initialize(Action onCompleted); // Vytvoření tasku + void ExitTask(Action onExit); // Při opuštění úkolu + void Complete(); // Označit úkol jako dokončený +} \ No newline at end of file diff --git a/Assets/TimingWheelShooter.cs b/Assets/TimingWheelShooter.cs index 047cc09..eee3631 100644 --- a/Assets/TimingWheelShooter.cs +++ b/Assets/TimingWheelShooter.cs @@ -11,10 +11,30 @@ public class TimingWheelShooter : MonoBehaviour, ITask [SerializeField] private TaskType taskType = TaskType.Task; [SerializeField] private Vector2 taskLocation = Vector2.zero; - public string TaskID => taskID; - public TaskType TaskType => taskType; - public string TaskName => taskName; - public (double, double) TaskLocation => (taskLocation.x, taskLocation.y); + public string TaskID + { + get => taskID; + set => taskID = value; + } + + public TaskType TaskType + { + get => taskType; + set => taskType = value; + } + + public string TaskName + { + get => taskName; + set => taskName = value; + } + + public (double, double) TaskLocation + { + get => (taskLocation.x, taskLocation.y); + set => taskLocation = new Vector2((float)value.Item1, (float)value.Item2); + } + public bool IsCompleted { get; private set; } [Header("Wheel")] diff --git a/Assets/New Material 2.mat b/Assets/bramboracolor1.mat similarity index 99% rename from Assets/New Material 2.mat rename to Assets/bramboracolor1.mat index 7fb50c0..3047f85 100644 --- a/Assets/New Material 2.mat +++ b/Assets/bramboracolor1.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: New Material 2 + m_Name: bramboracolor1 m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 diff --git a/Assets/New Material 1.mat b/Assets/bramboracolor2.mat similarity index 99% rename from Assets/New Material 1.mat rename to Assets/bramboracolor2.mat index 63f79c4..ae200a8 100644 --- a/Assets/New Material 1.mat +++ b/Assets/bramboracolor2.mat @@ -7,7 +7,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: New Material 1 + m_Name: bramboracolor2 m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 diff --git a/Assets/glasss.mat b/Assets/diamant.mat similarity index 99% rename from Assets/glasss.mat rename to Assets/diamant.mat index d2a4a7a..95f2735 100644 --- a/Assets/glasss.mat +++ b/Assets/diamant.mat @@ -20,7 +20,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: glasss + m_Name: diamant m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 diff --git a/Assets/itask.cs b/Assets/itask.cs deleted file mode 100644 index 2434fb1..0000000 --- a/Assets/itask.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using UnityEngine; - -public enum TaskType -{ - Task -} - -public interface ITask -{ - string TaskID { get; } - TaskType TaskType { get; } - string TaskName { get; } - (double, double) TaskLocation { get; } - bool IsCompleted { get; } - - void Initialize(Action onCompleted); - void ExitTask(Action onExit); - void Complete(); -} \ No newline at end of file diff --git a/Assets/New Material.mat b/Assets/sklo.mat similarity index 99% rename from Assets/New Material.mat rename to Assets/sklo.mat index fc46ad0..d550f4f 100644 --- a/Assets/New Material.mat +++ b/Assets/sklo.mat @@ -20,7 +20,7 @@ Material: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: New Material + m_Name: sklo m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0