19 lines
510 B
C#
19 lines
510 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace Assets.Scripts.Furniture
|
|
{
|
|
public class FurnitureButton : MonoBehaviour
|
|
{
|
|
public GameObject furniturePrefab;
|
|
private FurnitureManager _furnitureManager;
|
|
|
|
private void Start()
|
|
{
|
|
_furnitureManager = FindFirstObjectByType<FurnitureManager>();
|
|
|
|
GetComponent<Button>().onClick.AddListener(() => _furnitureManager.SetSelectedFurniture(furniturePrefab));
|
|
}
|
|
}
|
|
} |