Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     OwnController       = gameObject.GetComponentInParent <SFController>();
     BodyCollisions      = new List <Collider2D>();
     _interactAreaRadius = SFConfig._InteractAreaRadius;
     interactController  = gameObject.GetComponentInParent <InteractController>();
     interactController.InteractRadius = _interactAreaRadius;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     OwnController      = gameObject.GetComponent <SFController>();
     OwnController.type = SFController.SFType.Resource;
     RC                   = gameObject.transform.Find("ProducingTip/ResourceTips").gameObject;
     HPRC                 = RC.GetComponent <HingeProducingResourceController>();
     HPRC.Cycle           = ResourceSF._AddResourceCycle;
     HPRC.ResourceByCycle = ResourceSF._AddResourceByCycle;
 }
Exemplo n.º 3
0
        public static void SubmitSfOrder()
        {
            Log.Info("开始预报荷兰小包");
            //预报荷兰小包
            var list = WayBillController.GetNlPostWayBillNumberList();

            if (list.Any())
            {
                const int pagesize  = 50;//分批查询
                int       pageindex = 1;
                do
                {
                    var waybillList = WayBillController.GetWayBillSfModelList(list.Skip((pageindex - 1) * pagesize).Take(pagesize).ToList());
                    if (waybillList.Any())
                    {
                        foreach (var wayBillSfModel in waybillList)
                        {
                            try
                            {
                                if (!wayBillSfModel.ApplicationInfo.Any())
                                {
                                    WayBillController.SubmitFailure(wayBillSfModel.WayBillNumber, "没有申报信息");
                                    continue;
                                }
                                var parcel = SFController.NlPost(wayBillSfModel);
                                if (parcel != null && !parcel.WayBillNumber.IsNullOrWhiteSpace() && !parcel.MailNo.IsNullOrWhiteSpace())
                                {
                                    if (SFController.NlPostConfirm(parcel.WayBillNumber, parcel.MailNo))
                                    {
                                        //记录成功
                                        WayBillController.SubmitSuccess(parcel);
                                    }
                                    else
                                    {
                                        //取消订单
                                        SFController.NlPostConfirm(parcel.WayBillNumber, parcel.MailNo, 2);
                                    }
                                }
                            }
                            catch (Exception ex)
                            {
                                Log.Error("运单号:{0} 提交顺丰API异常信息:{1}".FormatWith(wayBillSfModel.WayBillNumber, ex.Message));
                            }
                        }
                    }
                    pageindex++;
                } while (list.Count > (pageindex - 1) * pagesize);
            }
            Log.Info("完成预报荷兰小包");
            WayBillController.UpdateOutShippingMethod();
        }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     OwnController      = gameObject.GetComponent <SFController>();
     action             = OwnController.Interact.GetComponent <InteractController>().InteractCollider.GetComponent <SFInteractAction>();
     OwnController.type = SFController.SFType.Shield;
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     OwnController      = gameObject.GetComponent <SFController>();
     OwnController.type = SFController.SFType.Attack;
 }