Files
SimUL/Assets/Scripts/Buildings/Building.cs
T
Vladimir Koshevarov 73f06d8754 added tooltips
2022-11-29 19:09:00 +02:00

36 lines
896 B
C#

using Assets.Scripts.Actions.Interfaces;
using System.Collections.Generic;
using UnityEngine;
namespace Assets.Scripts.Buildings
{
public abstract class BaseCell : MonoBehaviour
{
protected string _name;
protected List<IPlayerAction> _optionsList;
[SerializeField]
private ConversationController _conversationController;
// Start is called before the first frame update
void Start()
{
_optionsList = new List<IPlayerAction>();
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);
}
}
}