36 lines
896 B
C#
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);
|
|
|
|
}
|
|
}
|
|
} |