movement and dialogue system
This commit is contained in:
parent
977e666577
commit
1590b5faa6
123 changed files with 62825 additions and 355 deletions
20
Assets/Scripts/Task/Task.cs
Normal file
20
Assets/Scripts/Task/Task.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "New Task", menuName = "Task")]
|
||||
public class Task : ScriptableObject
|
||||
{
|
||||
[Serializable]
|
||||
public class ItemRequirment
|
||||
{
|
||||
public Item item;
|
||||
public int amount;
|
||||
}
|
||||
public string taskName;
|
||||
public string description;
|
||||
public bool completed;
|
||||
public ItemRequirment[] requirements;
|
||||
public Dictionary<Item, int> itemProgress = new();
|
||||
|
||||
}
|
||||
2
Assets/Scripts/Task/Task.cs.meta
Normal file
2
Assets/Scripts/Task/Task.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1c01ddc715d8c67a484f6db39ab1dea8
|
||||
33
Assets/Scripts/Task/TaskManager.cs
Normal file
33
Assets/Scripts/Task/TaskManager.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class TaskManager : MonoBehaviour
|
||||
{
|
||||
#region Statication
|
||||
|
||||
public static TaskManager instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (instance != null && instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
instance = this;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public List<Task> activeTasks = new();
|
||||
public int maxTasksActive;
|
||||
public bool AddTask(Task taskToAdd)
|
||||
{
|
||||
if (activeTasks.Count >= maxTasksActive)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
activeTasks.Add(taskToAdd);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Task/TaskManager.cs.meta
Normal file
2
Assets/Scripts/Task/TaskManager.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0f33e52582ba6110ea0373ae52f6ae9d
|
||||
Loading…
Add table
Add a link
Reference in a new issue