public static Cell FindCellByPositon(Vector2 offset)
{
return AllCell.Find(cell => cell.Position == SelectedCell.Position + offset);
}
interface IComponent
{
public Sprite Image { get; }
public int Cost { get; }
public string Name { get; }
public string CompanyName { get; }
public void ShowBuyDialog();
}
public class Processor : MonoBehaviour, IComponent
{
public Sprite Image => _image;
public int Cost => _cost;
public string Name => _name;
public string CompanyName => _companyName;
[SerializeField] private string _name;
[SerializeField] private string _companyName;
[SerializeField] private int _cost;
[SerializeField] private Sprite _image;
}