20 lines
526 B
C#
20 lines
526 B
C#
using UnityEngine;
|
|
|
|
public class ClearCounter : MonoBehaviour
|
|
{
|
|
|
|
[SerializeField] private KitchenObjectSO kitchenObjectSO;
|
|
[SerializeField] private Transform counterTopPoint;
|
|
|
|
public void Interact()
|
|
{
|
|
Debug.Log("Interacted!");
|
|
|
|
Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab, counterTopPoint);
|
|
|
|
kitchenObjectTransform.localPosition = Vector3.zero;
|
|
|
|
Debug.Log(kitchenObjectTransform.GetComponent<KitchenObject>().GetKitchenObjectSO().objectName);
|
|
}
|
|
|
|
}
|