HappyWheelMinigame #11
21
Assets/GameManager/ITask.cs
Normal file
21
Assets/GameManager/ITask.cs
Normal file
@@ -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<ITask> onCompleted); // Vytvoření tasku
|
||||
void ExitTask(Action<ITask> onExit); // Při opuštění úkolu
|
||||
void Complete(); // Označit úkol jako dokončený
|
||||
}
|
||||
@@ -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")]
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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<ITask> onCompleted);
|
||||
void ExitTask(Action<ITask> onExit);
|
||||
void Complete();
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user