movement and dialogue system
This commit is contained in:
parent
977e666577
commit
1590b5faa6
123 changed files with 62825 additions and 355 deletions
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue