monolith burger door have trigger to open a menu

This commit is contained in:
Vladimir Koshevarov
2022-08-18 14:31:33 +03:00
parent 80df6bde42
commit a9e1db4ac2
3 changed files with 36 additions and 16 deletions
+13 -9
View File
@@ -6,25 +6,29 @@ namespace Assets.Scripts.Buildings
{
public abstract class BaseCell : MonoBehaviour
{
public Dictionary<string, BaseAction> OptionsList;
protected BaseCell()
{
OptionsList = new Dictionary<string, BaseAction>();
}
protected abstract void BuildOptionsList();
protected string _name;
protected Dictionary<string, BaseAction> _optionsList;
// 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.Instance.Change(_name, _optionsList);
}
}
}