public void CreateOrder(int orderSize) { FutureOrder newOrder = new FutureOrder { orderSize = orderSize, extraIngredientsToSpawn = extraIngredientsToSpawn }; ordersToSpawn.Push(newOrder); }
public void PlaceOrder() { FutureOrder orderToServe = ordersToSpawn.Pop(); GameObject newOrder = Instantiate(Order, transform.position, Quaternion.identity); newOrder.transform.Translate(new Vector3(0, -distanceBTWOrders * (float)transform.childCount, 0)); newOrder.transform.parent = transform; newOrder.transform.GetChild(0).GetComponent <Order>().InitialSetup(orderToServe.orderSize, orderToServe.extraIngredientsToSpawn, gameIngredientsSymbols); }
//[Task(Time="10:00")] //void MyTask() //{ // //10:00准时执行 //} public override void OnOrder(FutureOrder order) { //委托状态变化时执行 }