19 lines
486 B
C#
19 lines
486 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
|
|
public class ContainerCounter : BaseCounter
|
|
{
|
|
[SerializeField] private KitchenObjectSO kitchenObjectSO;
|
|
public event EventHandler OnPlayerGrabbedObject;
|
|
|
|
public override void Interact(Player player)
|
|
{
|
|
if (kitchenObjectSO != null && player.KitchenObject == null)
|
|
{
|
|
KitchenObject.SpawnKitchenObject(kitchenObjectSO, player);
|
|
OnPlayerGrabbedObject?.Invoke(this, EventArgs.Empty);
|
|
}
|
|
}
|
|
}
|