Ejemplo n.º 1
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as BindGuidePanelData ?? new BindGuidePanelData();
            ButtonGuide.transform.DOLocalMoveY(1f, 2f).SetEase(Ease.Linear).SetLoops(-1, LoopType.Yoyo);
            Meteors.transform.DOLocalMoveX(-2370, 5f).SetLoops(-1, LoopType.Restart);
            Meteors.transform.DOLocalMoveY(-470, 5f).SetLoops(-1, LoopType.Restart);
            // ButtonGuide.transform.DOLocalRotate(3f, 3f,RotateMode.FastBeyond360).SetLoops(-1,LoopType.Yoyo);

            // 绑定
            ButtonGuide.OnClickAsObservable().Subscribe((unit =>
            {
                AudioManager.PlaySound("Button_Audio");
                Debug.Log("绑定");

                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <BindConfirmBootPanel>(new BindConfirmBootPanelData(), UITransitionType.CIRCLE, this);
            })).AddTo(this);

            BtnBack.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            }).AddTo(this);
            BtnSkipGuide.OnClickAsObservable().Subscribe((unit =>
            {
                AudioManager.PlaySound("Button_Audio");
                Debug.Log("随便听听跳过");
                CommonUtil.OpenCloudMain(this);
            })).AddTo(this);
            // please add init code here
        }
Ejemplo n.º 2
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as ChoosePhotoPanelData ?? new ChoosePhotoPanelData();
     // please add init code here
     BtnCancel.onClick.AddListener(() => {
         Back();
     });
     BtnAlbum.onClick.AddListener(() => {
         SimpleEventSystem.Publish(new ChoosePhotoClick(mData.action, NativeAction.Album));
         Back();
     });
     BtnCamera.onClick.AddListener(() => {
         SimpleEventSystem.Publish(new ChoosePhotoClick(mData.action, NativeAction.Camera));
         Back();
     });
     if (mData.showTip)
     {
         TextTip.gameObject.SetActive(true);
         TextCamera.text = "拍摄";
     }
     else
     {
         TextTip.gameObject.SetActive(false);
         TextCamera.text = "拍照";
     }
 }
Ejemplo n.º 3
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as ListItemPanelData ?? new ListItemPanelData();
            string NoDataImageName = PlayerPrefsUtil.ContentModel.isPowerPlan != 1 && PlayerPrefsUtil.ContentModel.subject == 1?"en_nodata":"cn_nodata";
            var    loadSprite      = mResLoader.LoadSync <Texture2D>(NoDataImageName);

            NoData.sprite = Sprite.Create(loadSprite, new Rect(0, 0, loadSprite.width, loadSprite.height), Vector2.one * 0.5f);
            NoData.gameObject.SetActive(false);
            BtnBack.onClick.AddListener(() =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            });
            ImgAudio.onClick.AddListener(ShowAudio);
            ImgPicBook.onClick.AddListener(ShowPicBook);
            ImgVideo.onClick.AddListener(ShowVideo);

            if (mData.FunTag == ItemType.AUDIO)
            {
                ShowAudio();
                ImgAudio.GetComponent <ListItemButtonEffect>().IsBig.Value = true;
            }
            else if (mData.FunTag == ItemType.PICBOOK)
            {
                ShowPicBook();
                ImgPicBook.GetComponent <ListItemButtonEffect>().IsBig.Value = true;
            }
            else
            {
                ShowVideo();
                ImgVideo.GetComponent <ListItemButtonEffect>().IsBig.Value = true;
            }
        }
Ejemplo n.º 4
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as HistoricalPhotoWallPanelData ?? new HistoricalPhotoWallPanelData();

            BtnBack.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            }).AddTo(this);
            Dictionary <string, object> paramDict = new Dictionary <string, object>();

            paramDict.Add("babyId", PlayerPrefsUtil.GetBabyId());
            Debug.Log(paramDict);
            HttpUtil.GetWithSign <List <PhotoWallModel> >(UrlConst.FindPhotoWall, paramDict)
            .Subscribe(response =>
            {
                this.CreatMedalItem(response);
                Debug.Log("------" + response);
            }
                       , e =>
            {
                if (e is HttpException)
                {
                    HttpException http = e as HttpException;
                    Log.E("弹吐司" + http.Message);
                }
            }).AddTo(this);

            // please add init code here
        }
Ejemplo n.º 5
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIStoryPanelData ?? new UIStoryPanelData();
            // please add init code here

            var text = TxtStoryContent.text;

            TxtStoryContent.text = string.Empty;
            TxtStoryContent.DOText(text, 10.0f)
            .OnComplete(() =>
            {
                //OpenGamePanel();
                this.DoTransition <UIGamePanel>(new FadeInOut(), uiData: new UIGamePanelData()
                {
                    InitLevelName = GameData.CurLevelName
                });
            });

            // 点击屏幕显示所有文字
            Observable.EveryUpdate()
            .Where(_ =>
                   Input.GetMouseButtonUp(0) ||
                   Input.GetKey(KeyCode.H) ||
                   Input.GetKey(KeyCode.Return) ||
                   Input.GetKey(KeyCode.Space))
            .Subscribe(_ =>
            {
                TxtStoryContent.DOKill();
                TxtStoryContent.text = text;
                BtnSkip.Show();
            }).AddTo(this);
        }
Ejemplo n.º 6
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UITrainModePanelData ?? new UITrainModePanelData();
            // please add init code here

            mData.UnLockLevelNames.ForEach(levelName =>
            {
                UILevelItemTemplate.Instantiate()
                .Parent(Content)
                .LocalIdentity()
                .ApplySelfTo(self =>
                {
                    self.Init(levelName);
                    self.Show();
                });
            });

            Observable.NextFrame().Subscribe(_ =>
            {
                var preferredHeight = Content.GetComponent <GridLayoutGroup>().preferredHeight;
                if (preferredHeight > 560)
                {
                    Content.GetComponent <ContentSizeFitter>().Enable();
                }
            });
        }
Ejemplo n.º 7
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as CollectGiftBoxPanelData ?? new CollectGiftBoxPanelData();
            BtnCheck.onClick.AddListener(() =>
            {
                SimpleEventSystem.Publish(new CollectGiftBoxPanelClosed(mData.Type));
                Back();
            });
            if (mData.Type == CollectGiftBoxType.Exchange)
            {
                var texture2D = mResLoader.LoadSync <Texture2D>("text_exchange_succee");
                ImgSuccess.sprite = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.one * 0.5f);

                var giftTexture2D = mResLoader.LoadSync <Texture2D>("text_baby_exclusive_gift");
                ImgName.sprite = Sprite.Create(giftTexture2D, new Rect(0, 0, giftTexture2D.width, giftTexture2D.height), Vector2.one * 0.5f);
            }
            else if (mData.Type == CollectGiftBoxType.ChineseLearningPlan)
            {
                var texture2D = mResLoader.LoadSync <Texture2D>("text_received_succee");
                ImgSuccess.sprite = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.one * 0.5f);
                var giftTexture2D = mResLoader.LoadSync <Texture2D>("text_chinese_learning_plan");
                ImgName.sprite = Sprite.Create(giftTexture2D, new Rect(0, 0, giftTexture2D.width, giftTexture2D.height), Vector2.one * 0.5f);
            }
            else if (mData.Type == CollectGiftBoxType.EnglishLearningPlan)
            {
                var texture2D = mResLoader.LoadSync <Texture2D>("text_received_succee");
                ImgSuccess.sprite = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.one * 0.5f);
                var giftTexture2D = mResLoader.LoadSync <Texture2D>("text_english_learning_plan");
                ImgName.sprite = Sprite.Create(giftTexture2D, new Rect(0, 0, giftTexture2D.width, giftTexture2D.height), Vector2.one * 0.5f);
            }
        }
Ejemplo n.º 8
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as AttendanceSelectPanelData ?? new AttendanceSelectPanelData();

            ButtonCover.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            }).AddTo(this);

            ButtonChinese.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                CommonUtil.OpenCloudMain(this, new MainPanelData()
                {
                    ShopAction = 2
                });
            }).AddTo(this);
            ButtonEnglish.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                CommonUtil.OpenCloudMain(this, new MainPanelData()
                {
                    ShopAction = 1
                });
            }).AddTo(this);
            // please add init code here
        }
Ejemplo n.º 9
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     AudioManager.SetMusicOff();
     mData             = uiData as BookDetailPanelData ?? new BookDetailPanelData();
     TvAuth.text       = mData.DayActionModel.author.IsNullOrEmpty()?string.Empty:"作者:" + mData.DayActionModel.author;
     TvTitle.text      = mData.DayActionModel.title;
     TvName.text       = mData.DayActionModel.name;
     TvContentIns.text = mData.DayActionModel.contentIntroduction;
     TvPicBookIns.text = mData.DayActionModel.picBookIntroduction;
     ImageDownloadUtils.Instance.SetAsyncImage(mData.DayActionModel.thumbUrl, ImgThumb);
     BtnStart.onClick.AddListener(() => {
         AudioManager.PlaySound("Button_Audio");
         // 跳转原生传参
         var param    = new Dictionary <string, object>();
         var subParam = new Dictionary <string, object>();
         subParam.Add("picBookId", mData.DayActionModel.resourceId);
         if (Application.platform == RuntimePlatform.Android)
         {
             param.Add("target", AppConst.BOOK_ANDROID);
             param.Add("params", subParam);
             AndroidForUnity.CallAndroidStartActivityForAnim(param.ToJson(), AppConst.ANIM_CIRCLE);
         }
         else
         {
             param.Add("target", AppConst.BOOK_IOS);
             param.Add("params", subParam);
             IOSClientUtil.CallIOSClient(param.ToJson());
         }
     });
     BtnBack.onClick.AddListener(() =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     });
 }
Ejemplo n.º 10
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as UIShopGemPanelData ?? new UIShopGemPanelData();
     // please add init code here
     ShowProductGemList();
     UITopStatus.TxtTopTitle.text = "商店";
 }
Ejemplo n.º 11
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as SettingPanelData ?? new SettingPanelData();
            // please add init code here

            if (PlayerPrefsUtil.GetDeviceId().IsNullOrEmpty())
            {
                ToggleDevice.gameObject.SetActive(false);
            }
            else
            {
                ToggleDevice.gameObject.SetActive(true);
            }
            BtnBack.onClick.AddListener(() =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            });
            BtnLogout.onClick.AddListener(() =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <TipPanel>(new TipPanelData()
                {
                    action   = TipAction.Logout,
                    message  = "确定退出登录吗?",
                    strTitle = "dola提示"
                });
            });

            SimpleEventSystem.GetEvent <TipConfirmClick>()
            .Subscribe(_ =>
            {
                if (_.GetAction == TipAction.Logout)
                {
                    // 弹窗提示,确定后,清除本地用户信息、清空list,打开login
                    CommonUtil.logout();
                }
            }).AddTo(this);
            BtnShare.onClick.AddListener(() =>
            {
                AudioManager.PlaySound("Button_Audio");
                if (Application.platform == RuntimePlatform.Android)
                {
                    Dictionary <string, object> param    = new Dictionary <string, object>();
                    Dictionary <string, object> subParam = new Dictionary <string, object>();
                    param.Add("target", AppConst.Share);
                    param.Add("params", subParam);
                    AndroidForUnity.CallAndroidStartActivity(param.ToJson());
                }
                else if (Application.platform == RuntimePlatform.IPhonePlayer)
                {
                    Dictionary <string, object> paramDic = new Dictionary <string, object>();
                    Dictionary <string, object> subParam = new Dictionary <string, object>();
                    paramDic.Add("method", IOSClientUtil.SettingShare);
                    paramDic.Add("params", subParam);
                    IOSClientUtil.CommonMethodCallIOSClient(paramDic.ToJson());
                }
            });
        }
Ejemplo n.º 12
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as MessageMaskPanelData ?? new MessageMaskPanelData();
     SimpleEventSystem.Publish(new CanvasDotMove());
     TvContent.text = mData.Content;
     TvTitle.text   = mData.Title;
     BtnClick.onClick.AddListener(() => { Back(); });
 }
Ejemplo n.º 13
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as DeviceStatusPanelData ?? new DeviceStatusPanelData();
            Meteors.transform.DOLocalMoveX(-2370, 5f).SetLoops(-1, LoopType.Restart);
            Meteors.transform.DOLocalMoveY(-470, 5f).SetLoops(-1, LoopType.Restart);
            ResquestDeviceStatus(-1);

            BtnConnect.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <BindConfirmBootPanel>(new BindConfirmBootPanelData(), UITransitionType.CIRCLE, this);
            }).AddTo(this);

            BtnBack.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                Back();
            }).AddTo(this);
            SimpleEventSystem.GetEvent <UpdateVol>()
            .Subscribe(_ =>
            {
                if (_.Message.IsNotNullAndEmpty())
                {
                    DeviceConnectStatus(true);
                    DeviceVolModel model = SerializeHelper.FromJson <DeviceVolModel>(_.Message);
                    if (model.isUpdate)
                    {
                        SliderDeviceVoice.Slider.value = model.progress;
                        TextProgress.text = string.Format("{0}%", model.progress);
                    }
                    else
                    {
                        UIMgr.OpenPanel <TipPanel>(new TipPanelData()
                        {
                            action                = TipAction.DeviceLostControl,
                            message               = "家庭组内" + model.babyRelation + "正在控制此设备",
                            isHideCancelButton    = true,
                            removeConfirmCallback = true,
                            strConfirm            = "知道了"
                        });
                    }
                }
            }).AddTo(this);
            if (Application.platform == RuntimePlatform.Android)
            {
                AndroidForUnity.CallAndroidForQueryVol();
            }
            else if (Application.platform == RuntimePlatform.IPhonePlayer)
            {
                Dictionary <string, object> param    = new Dictionary <string, object>();
                Dictionary <string, object> subParam = new Dictionary <string, object>();
                param.Add("method", IOSClientUtil.QueryDeviceVolume);
                param.Add("params", subParam);
                Debug.Log("params ========" + subParam);
                IOSClientUtil.CommonMethodCallIOSClient(param.ToJson());
            }
            SliderDeviceVoice.setIOnValueChange(this);
        }
Ejemplo n.º 14
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIInventoryNewPanelData ?? new UIInventoryNewPanelData();
            UITopStatus.TxtTopTitle.text = "背包";

            ShowInventoryList();
            LoadInventory();
            ShowUsedTextCount();
        }
Ejemplo n.º 15
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIHomePanelData ?? new UIHomePanelData();
            // please add init code here

            TxtDeathCountMin.text = string.Format("Death Count Record : {0}",
                                                  GameData.DeathCountMin == int.MaxValue ? "None" : GameData.DeathCountMin.ToString());

            TxtVersion.text = "v" + Application.version;
        }
Ejemplo n.º 16
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as AttendanceRulePanelData ?? new AttendanceRulePanelData();
     BtnBack.OnClickAsObservable().Subscribe(_ =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     }).AddTo(this);
     // please add init code here
 }
Ejemplo n.º 17
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as FamilySettingPanelData ?? new FamilySettingPanelData();
     // please add init code here
     StartRequestForFindMemberInfo();
     BtnConfirm.onClick.AddListener(() =>
     {
         AudioManager.PlaySound("Button_Audio");
         Log.I("mFamilyId: " + mFamilyModel.id);
         if (mFamilyModel.IsNull())
         {
             CommonUtil.toast("请选择成员");
         }
         else
         {
             if (mData.type == 0)
             {
                 UIMgr.OpenPanel <TipPanel>(new TipPanelData()
                 {
                     action  = TipAction.FamilySubtract,
                     message = "确定移除该家长?"
                 });
             }
             else
             {
                 UIMgr.OpenPanel <TipPanel>(new TipPanelData()
                 {
                     action  = TipAction.FamilyTransfer,
                     message = "确定将管理员转让给所选对象?"
                 });
             }
         }
     });
     BtnCancel.onClick.AddListener(() =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     });
     SimpleEventSystem.GetEvent <TipConfirmClick>()
     .Subscribe(_ =>
     {
         if (_.GetAction == TipAction.FamilySubtract)
         {
             StartRequestForDoRejectMember();
         }
     }).AddTo(this);
     SimpleEventSystem.GetEvent <TipConfirmClick>()
     .Subscribe(_ =>
     {
         if (_.GetAction == TipAction.FamilyTransfer)
         {
             StartRequestForDoTransferManager();
         }
     }).AddTo(this);
 }
Ejemplo n.º 18
0
 protected override void OnOpen(QFramework.IUIData uiData)
 {
     //UITopStatus.Instantiate()
     //.ApplySelfTo(self =>
     //{
     //    self.TopStatusModel = new TopStatusModel()
     //    {
     //        StrTitle = "背包"
     //    };
     //});
 }
Ejemplo n.º 19
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as IntegralDescripPanelData ?? new IntegralDescripPanelData();
     // please add init code here
     BtnBack.OnClickAsObservable().Subscribe(_ =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     }).AddTo(this);
     this.CreatItemList(mData.mMedalsLiast);
 }
Ejemplo n.º 20
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIGameOverPanelData ?? new UIGameOverPanelData();
            // please add init code here

            GameData.DeathCountMin = GameData.DeathCountMin >= mData.DeathCountCurrent ? mData.DeathCountCurrent : GameData.DeathCountMin;

            TxtDeathCountCurrent.text = string.Format("Death Count : {0}", mData.DeathCountCurrent);
            TxtDeathCountMin.text     = string.Format("Death Count Record : {0}", GameData.DeathCountMin);

            mData.DeathCountCurrent = 0;
        }
Ejemplo n.º 21
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     AudioManager.SetMusicOff();
     mData = uiData as TargetDetailPanelData ?? new TargetDetailPanelData();
     BtnBack.onClick.AddListener(() =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     });
     TvTitle.text   = mData.BoxModel.name + "第" + mData.BoxModel.month + "个月";
     TvContent.text = mData.BoxModel.intro;
 }
Ejemplo n.º 22
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as AttendanceInstructionsPanelData ?? new AttendanceInstructionsPanelData();
     BtnBack.OnClickAsObservable().Subscribe(_ =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     }).AddTo(this);
     ButtonConfirm.OnClickAsObservable().Subscribe(_ =>
     {
         AudioManager.PlaySound("Button_Audio"); Back();
     }).AddTo(this);
 }
Ejemplo n.º 23
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIInventoryItemPanelData ?? new UIInventoryItemPanelData();
            // please add init code here
            ImgItem.sprite = Resources.Load <Sprite>(mData.item.Sprite);
            ItemDesc.text  = mData.item.GetToolTipText();
            if (mData.item.Type == ItemType.Consumable || mData.item.Type == ItemType.Material)
            {
                BtnUpgrade.Hide();
            }

            ShowSelectTxt();
        }
Ejemplo n.º 24
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as HotFixedPanelData ?? new HotFixedPanelData();

            HotPatchManager.Instance.Init(this);

            HotFixedSlider.fillAmount = 0;
            HotFixedInfoText.text     = string.Empty;
            //   HotFixedSliderText.text = string.Format("{0:F}M/S", 0);
            HotPatchManager.Instance.ServerInfoError += ServerInfoError;
            HotPatchManager.Instance.ItemError       += ItemError;

//#if UNITY_EDITOR
            //   StartOnFinish();
//#else
            if (HotPatchManager.Instance.ComputeUnPackFile())
            {
                HotFixedSliderText.text = "初始化中.....";
                HotPatchManager.Instance.StartUnackFile(() =>
                {
                    m_SumTime = 0;
                    HotFix();
                });
            }
            else
            {
                HotFix();
            }
//#endif

            Observable.EveryUpdate()
            .Subscribe(_ =>
            {
                if (HotPatchManager.Instance.StartUnPack)
                {
                    m_SumTime += Time.deltaTime;
                    HotFixedSlider.fillAmount = HotPatchManager.Instance.GetUnpackProgress();
                    //float speed = (HotPatchManager.Instance.AlreadyUnPackSize / 1024.0f) / m_SumTime;
                    //HotFixedSliderText.text = string.Format("{0:F} M/S", speed);
                }

                if (HotPatchManager.Instance.StartDownload)
                {
                    m_SumTime += Time.deltaTime;
                    HotFixedSlider.fillAmount = HotPatchManager.Instance.GetProgress();
                    float speed             = (HotPatchManager.Instance.GetLoadSize() / 1024.0f) / m_SumTime;
                    HotFixedSliderText.text = string.Format("{0:F} M/S", speed);
                }
            }).AddTo(gameObject);
        }
Ejemplo n.º 25
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as BindCheckWIFIPanelData ?? new BindCheckWIFIPanelData();
     BtnBack.OnClickAsObservable().Subscribe(_ =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     }).AddTo(this);
     BtnDetermineWiFi.OnClickAsObservable().Subscribe(_ =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     }).AddTo(this);
     SimpleEventSystem.GetEvent <CloseBindCheckWIFI>().Subscribe(_ => { Back(); }).AddTo(this);
 }
Ejemplo n.º 26
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as MedalAnimationPanelData ?? new MedalAnimationPanelData();

            TvMedalDay.text  = "第一天";
            TvMedalName.text = String.Format("\"{0}\"勋章", mData.medalModel.medalName);
            TvMedalDay.text  = String.Format("第{0}天", mData.medalModel.medalGrade);

            BtnMedalReceived.OnClickAsObservable().Subscribe(_ =>
            {
                Debug.Log("勋章点击领取");
                RequestDrawMedal();
            }).AddTo(this);

            // please add init code here
        }
Ejemplo n.º 27
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as GiftListPanelData ?? new GiftListPanelData();

            RequestGoodList();

            BtnBack.OnClickAsObservable().Subscribe(_ => {
                Back();
                AudioManager.PlaySound("Button_Audio");
            }).AddTo(this);
            BtnIntegral.OnClickAsObservable().Subscribe(_ =>
            {
                AudioManager.PlaySound("Button_Audio");
                UIMgr.OpenPanel <IntegralDetailPanel>(new IntegralDetailPanelData(), UITransitionType.CIRCLE, this);
            }).AddTo(this);
        }
Ejemplo n.º 28
0
        protected override void OnInit(QFramework.IUIData uiData)
        {
            mData = uiData as UIDataUpdateSucceedPanelData ?? new UIDataUpdateSucceedPanelData();
            // please add init code here

            TxtTile.text = mData.SuccessModel.StrTitle;
            TxtDesc.text = mData.SuccessModel.StrDesc;
            if (mData.SuccessModel.IsSucceed)
            {
                ImgTitle.sprite = Resources.Load <Sprite>("Images/MsgSucceed");
            }
            else
            {
                ImgTitle.sprite = Resources.Load <Sprite>("Images/MsgFailure");
            }
        }
Ejemplo n.º 29
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as PlayGamePanelData ?? new PlayGamePanelData();
     // please add init code here
     BtnBack.onClick.AddListener(() =>
     {
         AudioManager.PlaySound("Button_Audio");
         Back();
     });
     if (mData.DayActionModel.introPicStr.IsNotNullAndEmpty())
     {
         ImageDownloadUtils.Instance.SetAsyncImage(mData.DayActionModel.introPicStr, ImageContent, true);
     }
     // RectTransform rect = ImageContent.GetComponent<RectTransform>();
     // rect.sizeDelta = new Vector2( 500, 2000);
 }
Ejemplo n.º 30
0
 protected override void OnInit(QFramework.IUIData uiData)
 {
     mData = uiData as AddressListPanelData ?? new AddressListPanelData();
     // please add init code here
     BtnBack.onClick.AddListener(() => { Back(); });
     StartRequestForGetAddress();
     SimpleEventSystem.GetEvent <UpdateAddressDate>()
     .Subscribe(_ =>
     {
         Log.I("_.GetDate: " + _.GetIsUpdate);
         if (_.GetIsUpdate)
         {
             StartRequestForGetAddress();
         }
     }).AddTo(this);
 }