Add pause menu and fix static data dulpication when loading scenes
This commit is contained in:
parent
0849fcfde7
commit
e4706c7a42
11 changed files with 992 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
Reference in a new issue