// Start is called before the first frame update void Start() { CleanDishRack rack = FindObjectOfType <CleanDishRack>(); if (rack != null) { rack.DishAdded.AddListener(OnDishCountUpdated); } }
// Update is called once per frame private void Start() { if (sRenderer == null) { sRenderer = GetComponent <SpriteRenderer>(); } if (rack == null) { rack = FindObjectOfType <CleanDishRack>(); } if (rack != null) { rack.DishAdded.AddListener(OnDishCleaned); } for (int x = 0; x < dirtyDishes.Length; x++) { dirtyDishes[x].DisableDish(); } }