Plate holding object logic
This commit is contained in:
parent
7a3073ea8a
commit
3256232b12
8 changed files with 121 additions and 7 deletions
|
@ -46,6 +46,19 @@ public class KitchenObject : MonoBehaviour
|
|||
Destroy(gameObject);
|
||||
}
|
||||
|
||||
public bool TryGetPlate(out PlateKitchenObject plateKitchenObject)
|
||||
{
|
||||
if (this is PlateKitchenObject)
|
||||
{
|
||||
plateKitchenObject = this as PlateKitchenObject;
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
plateKitchenObject = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static public KitchenObject SpawnKitchenObject(KitchenObjectSO kitchenObjectSO, IKitchenObjectParent kitchenObjectParent)
|
||||
{
|
||||
Transform kitchenObjectTransform = Instantiate(kitchenObjectSO.prefab);
|
||||
|
|
Reference in a new issue