Add pause menu and fix static data dulpication when loading scenes

This commit is contained in:
BuyMyMojo 2023-03-04 03:57:30 +11:00
parent 0849fcfde7
commit e4706c7a42
11 changed files with 992 additions and 2 deletions

View file

@ -8,6 +8,11 @@ public class BaseCounter : MonoBehaviour, IKitchenObjectParent
public static event EventHandler OnAnyObjectPlaced;
public static void ResetStaticData()
{
OnAnyObjectPlaced = null;
}
[SerializeField] private Transform counterTopPoint;
private KitchenObject kitchenObject;

View file

@ -8,6 +8,11 @@ public class CuttingCounter : BaseCounter, IHasProgress
public static event EventHandler OnAnyCut;
new public static void ResetStaticData()
{
OnAnyCut = null;
}
public event EventHandler<IHasProgress.OnProgressChangeEventsArgs> OnProgressChange;
public event EventHandler OnCut;

View file

@ -8,6 +8,11 @@ public class TrashCounter : BaseCounter
public static event EventHandler OnAnyObjectTrashed;
new public static void ResetStaticData()
{
OnAnyObjectTrashed = null;
}
public override void Interact(Player player)
{
if (player.HasKitchenObject())