Пример #1
0
        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();
        }
Пример #2
0
 public void SetData(TakePhotosGameRunningInfo runningInfo, List <AwardPB> aw)
 {
     _totalScore = runningInfo.GetCurScore();
     _photoVos   = runningInfo.GetPhotosVo();
     showIdex    = 0;
     SetScore(showIdex);
     _close.interactable = true;
     SetAwardData(aw);
     SetTitle(true);
 }
Пример #3
0
    private void DoGenerateT()
    {
        Vector2 pos   = View.GetPos();
        float   scale = View.GetScale();
        TakePhotosGameRunningInfo info = GetData <TakePhotosGameModel>().GetRunningInfo();
        Texture   blur   = View.GetTexture();
        Texture2D blur2d = TakePhotosGameRunningInfo.Texture2Texture2D(blur);

        info.playerTexture = TakePhotosGameRunningInfo.GenerateTexture(blur2d, -pos, 500, 500, scale);
        info.GetCurPhotoVo().playerTexture = info.playerTexture;
    }
Пример #4
0
    public void SetData(TakePhotosGameRunningInfo takePhotosGameRunningInfo)
    {
        string num = I18NManager.Get("Common_Number" + (takePhotosGameRunningInfo.GetCurPhotoOrder + 1).ToString());

        _title.text = I18NManager.Get("TakePhotosGame_TrainText", num);
        _Shutter.Hide();
        _texture = takePhotosGameRunningInfo.originTexture;
        string materialPath = "TakePhotosGame/Material/TakePhotosBlur";

        _blurM = ResourceManager.Load <Material>(materialPath);

        curBlurValue = 0.5f;
        SetPhotoBlur(0.3f);
        _scale.value = 0;
        OnScaleChange(0);
        _photo.SetPositionOfPivot(Vector2.zero);
        SetCurShowState(TakePhotosGameShowState.Scale);
        ShowCurShowState();
        _isPause = false;
    }
Пример #5
0
 public void SetPhotoArea(TakePhotosGameRunningInfo runningInfo)
 {
     _target.texture = runningInfo.targetTexture;
     _content.text   = I18NManager.Get("TakePhotosGame_CountDownContent", runningInfo.GetCurPhotoOrder + 1);
 }