Removed TOTU 103
This commit is contained in:
		
							
								
								
									
										19
									
								
								Assets/Rendering/Scripts/Furniture/FurnitureButton.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								Assets/Rendering/Scripts/Furniture/FurnitureButton.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| 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)); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Ignacio Gómez Puga
					Ignacio Gómez Puga