void Start() { chairs = new Chair[transform.childCount]; chairs = transform.GetComponentsInChildren <Chair> (); var tt = transform.GetChild(4); dishPoint = new Transform[tt.childCount]; for (int i = 0; i < tt.childCount; i++) { dishPoint[i] = tt.GetChild(i); } EatUpAllDishPoint = transform.GetChild(3); statusNotice = NoticeM.UseStaticNotice("Not Use", transform.position + Vector3.up * 1.3f); }
void Start() { food = new List <Food>(GetComponentsInChildren <Food>()); foodTableDish = new FoodTableDish[food.Count]; prevFoodRemainAmount = new float[food.Count]; for (int i = 0; i < food.Count; i++) { foodTableDish[i] = food [i].transform.GetComponentInParent <FoodTableDish> (); foodTableDish [i].childFood = food [i]; prevFoodRemainAmount [i] = food [i].remainFoodAmount; } statusNotices = new StatusNotice[food.Count]; for (int i = 0; i < food.Count; i++) { statusNotices[i] = NoticeM.UseStaticNotice(food[i].remainFoodAmount.ToString(), food[i].socket.position); } }