private void OnStartHandler(StartTakePhotoRes res) { GetData <TakePhotosGameModel>().InitRunningInfo(res); SendMessage(new Message(MessageConst.MODULE_TAKEPHOTOSGAME_GOTO_COUNTDOWN_PANEL)); LoadingOverlay.Instance.Hide(); }
int _buyCount = 0; //购买拍照次数 /// <summary> /// 初始化数据 /// </summary> /// <param name="res"></param> public void InitRunningInfo(StartTakePhotoRes res) { _takePhotosGameRunningInfo = new TakePhotosGameRunningInfo(); /////test //for(int i=18;i< _takePhotoRulePBs.Count;i++) //{ // var v = _takePhotoRulePBs[i]; // var rule = GetRulePbById(v.Id); // if (rule == null) // { // Debug.LogError("don't find rule id" + rule.Id); // continue; // } // var vo = new TakePhotoGamePhotoVo(rule); // vo.Id = v.Id; // _takePhotosGameRunningInfo.AddTakePhotoGamePhotoVo(vo); //} ////test end foreach (var v in res.PictureId) { var rule = GetRulePbById(v); if (rule == null) { Debug.LogError("don't find rule id" + rule.Id); continue; } var vo = new TakePhotoGamePhotoVo(rule); vo.Id = v; _takePhotosGameRunningInfo.AddTakePhotoGamePhotoVo(vo); } _takePhotosGameRunningInfo.Init(); }