public async Task <BLSingleResponse <bool> > SaveOrderAsync(OrderDto consumeDto) { var response = new BLSingleResponse <bool>(); try { TableStateManager stateManager = await TableStateManager.GetTableStateManagerAsync(tableSvc, consumeDto); if (await stateManager.SaveAsync(consumeDto)) { var resp = await _uow.GetEfRepository <Order>().InsertAsync(consumeDto.BaseEntity); await _uow.CommitAsync(); } } catch (Exception ex) { HandleSVCException(response, ex); } return(response); }
} //Order 상태 AI void EatStateAction() //Eat 상태 AI { timer += Time.deltaTime; if (timer >= timeToEatSec) { //방금 식사가 완료된 상태 if (myTable != null) { TableStateManager table = myTable.GetComponent <TableStateManager>(); table.DecideWhoPay(); table.stateOfTable = T_STATE.DIRTY; currentState = G_STATE.MOVE; table.guestGroup.Clear(); table.transform.parent.GetComponentInChildren <TableActMarker>().ShowActionMarker(currentState); myMenus = table.GetOrderMenus(); myTable = null; myGroup = null; myGround.GetComponent <GroundUnit>().SetAbsolutePassable(true); } //값을 지불한 상태(PayAtCounter 스크립트 참조) else { currentState = G_STATE.MOVE; } GameObject moveToGround = null; if (isPayer) { moveToGround = counterToPay.GetComponent <PayAtCounter>().EnqueueGuestForPay(gameObject); MoveThisGround(moveToGround); } else { moveToGround = RayCastGround(GameObject.Find("GuestSpawn").transform.position); MoveThisGround(moveToGround); } } }