Files
SimUL/Assets/Scripts/Buildings/Building.cs
T
2022-08-18 16:07:06 +03:00

36 lines
907 B
C#

using Assets.Scripts.Actions;
using System.Collections.Generic;
using UnityEngine;
namespace Assets.Scripts.Buildings
{
public abstract class BaseCell : MonoBehaviour
{
protected string _name;
protected Dictionary<string, BaseAction> _optionsList;
[SerializeField]
private ConversationController _conversationController;
// Start is called before the first frame update
void Start()
{
_optionsList = new Dictionary<string, BaseAction>();
Initialize();
BuildOptionsList();
}
// Update is called once per frame
void Update()
{
}
protected abstract void Initialize();
protected abstract void BuildOptionsList();
void OnTriggerEnter(Collider other)
{
_conversationController.Change(_name, _optionsList);
}
}
}