2021-04-12 22:21:16 +02:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
2021-04-12 12:51:03 +02:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using Logic.Agent;
|
|
|
|
using Logic.Data;
|
|
|
|
using Logic.Graph;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace Logic
|
|
|
|
{
|
|
|
|
public class AgentManager: MonoBehaviour
|
|
|
|
{
|
|
|
|
public static AgentManager Instance;
|
|
|
|
[SerializeField] private Waitress waitress;
|
|
|
|
[SerializeField] private WaitressInventory inventory;
|
|
|
|
|
|
|
|
private void Awake()
|
|
|
|
{
|
|
|
|
Instance = this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void GoToNode(Table table)
|
|
|
|
{
|
2021-04-12 22:21:16 +02:00
|
|
|
StartCoroutine(waitress.GoToNode(table));
|
2021-04-12 12:51:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool AddItem(Item item)
|
|
|
|
{
|
|
|
|
return inventory.AddItem(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
public List<Recipe> GetRecipes()
|
|
|
|
{
|
|
|
|
return inventory.GetRecipes();
|
|
|
|
}
|
|
|
|
|
|
|
|
public Food GETMealForTable(int tableId)
|
|
|
|
{
|
|
|
|
return inventory.GETMealForTable(tableId);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void RemoveItem(Item item)
|
|
|
|
{
|
|
|
|
inventory.RemoveItem(item);
|
|
|
|
}
|
2021-04-12 22:21:16 +02:00
|
|
|
|
|
|
|
public void RunToAnotherNode(Node destination)
|
|
|
|
{
|
|
|
|
StartCoroutine(waitress.RunToAnotherNode(destination));
|
|
|
|
}
|
2021-04-12 12:51:03 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|