Add SFX and SFX logic

This commit is contained in:
BuyMyMojo 2023-03-03 05:10:23 +11:00
parent f0e4f6c9ba
commit 1aa97baff4
19 changed files with 504 additions and 8 deletions

View file

@ -9,6 +9,7 @@ public class Player : MonoBehaviour, IKitchenObjectParent
public static Player Instance { get; private set; }
public event EventHandler OnPickedUpSomething;
public event EventHandler<OnSelectedCounterChangedEventArgs> OnSelectedcounterChanged;
public class OnSelectedCounterChangedEventArgs : EventArgs
{
@ -190,6 +191,11 @@ public class Player : MonoBehaviour, IKitchenObjectParent
public void SetKitchenObject(KitchenObject kitchenObject)
{
this.kitchenObject = kitchenObject;
if (kitchenObject != null)
{
OnPickedUpSomething?.Invoke(this, EventArgs.Empty);
}
}
public KitchenObject GetKitchenObject()