Add SFX and SFX logic
This commit is contained in:
parent
f0e4f6c9ba
commit
1aa97baff4
19 changed files with 504 additions and 8 deletions
|
@ -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()
|
||||
|
|
Reference in a new issue