Visualise burger construction on plate
This commit is contained in:
parent
3256232b12
commit
42cd3341fb
8 changed files with 388 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
@ -5,6 +6,12 @@ using UnityEngine;
|
|||
public class PlateKitchenObject : KitchenObject
|
||||
{
|
||||
|
||||
public event EventHandler<OnIngreedientAddedEventArgs> OnIngreedientAdded;
|
||||
public class OnIngreedientAddedEventArgs : EventArgs
|
||||
{
|
||||
public KitchenObjectSO KitchenObjectSO;
|
||||
}
|
||||
|
||||
[SerializeField] private List<KitchenObjectSO> validKitchenObjectSOList;
|
||||
|
||||
private List<KitchenObjectSO> kitchenObjectSOList;
|
||||
|
@ -27,6 +34,12 @@ public class PlateKitchenObject : KitchenObject
|
|||
} else
|
||||
{
|
||||
kitchenObjectSOList.Add(kitchenObjectSO);
|
||||
|
||||
OnIngreedientAdded?.Invoke(this, new OnIngreedientAddedEventArgs
|
||||
{
|
||||
KitchenObjectSO = kitchenObjectSO,
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue