// Token: 0x06001FD2 RID: 8146 RVA: 0x00184A28 File Offset: 0x00182C28 public void RemovePlate(int index) { Component component = this.plates[index]; this.plates.RemoveAt(index); UnityEngine.Object.Destroy(component.gameObject); for (int i = index; i < this.plates.Count; i++) { FoodInstance foodInstance = this.plates[i]; foodInstance.transform.parent = this.platePositions[i]; foodInstance.transform.localPosition = Vector3.zero; } }
// Token: 0x06001FD1 RID: 8145 RVA: 0x00184954 File Offset: 0x00182B54 public void AddPlate(Food food) { if (this.plates.Count >= this.maxPlates) { this.RemovePlate(this.maxPlates - 1); this.selectedIndex--; } for (int i = 0; i < this.plates.Count; i++) { FoodInstance foodInstance = this.plates[i]; foodInstance.transform.parent = this.platePositions[i + 1]; foodInstance.transform.localPosition = Vector3.zero; } SFXController.PlaySound(SFXController.Sounds.Plate); FoodInstance foodInstance2 = UnityEngine.Object.Instantiate <FoodInstance>(this.platePrefab); foodInstance2.transform.parent = this.platePositions[0]; foodInstance2.transform.localPosition = Vector3.zero; foodInstance2.food = food; this.plates.Insert(0, foodInstance2); }