25 lines
587 B
C#
25 lines
587 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
public class TrashCounter : BaseCounter
|
|
{
|
|
public static event EventHandler OnAnyObjectTrashed;
|
|
public override void Interact(Player player)
|
|
{
|
|
if (player.KitchenObject != null)
|
|
{
|
|
// Debug.Log("KitchenObject from player will be destroyed.");
|
|
player.KitchenObject.DestroySelf();
|
|
OnAnyObjectTrashed?.Invoke(this, System.EventArgs.Empty);
|
|
}
|
|
else
|
|
{
|
|
// Debug.Log("Player does not carry anything destroyable!");
|
|
}
|
|
}
|
|
|
|
public override void InteractAlternate(Player player)
|
|
{
|
|
Debug.Log("Cannot do anything alternativly here!");
|
|
}
|
|
} |