Projekt_SI_automatyczny_kelner/Assets/Logic/AgentManager.cs

53 lines
1.2 KiB
C#
Raw Normal View History

2021-04-12 22:21:16 +02:00
using System;
using System.Collections;
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));
}
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));
}
}
}