Visualise burger construction on plate

This commit is contained in:
BuyMyMojo 2023-03-02 06:17:41 +11:00
parent 3256232b12
commit 42cd3341fb
8 changed files with 388 additions and 11 deletions

View file

@ -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;
}
}