Esempio n. 1
0
        public override void OnPackageRequest(IMessage imsg, params object[] msg_params)
        {
            base.OnPackageRequest(imsg, msg_params);

            if (imsg is CSCartoonRewardRequest)
            {
                CSCartoonRewardRequest req = imsg as CSCartoonRewardRequest;
            }
        }
        public override void OnShow(object param)
        {
            base.OnShow(param);
            GameEvents.UIEvents.UI_StartCartoon_Event.OnNext += OnNext;
            if (param != null)
            {
                testName = param as string;
            }

            if (m_Capter != null)
            {
                GameObject.DestroyImmediate(m_Capter.gameObject);
            }
            resName = testName;
            if (testName.Contains(".mp4"))
            {
                this.m_video.VideoName      = testName;
                this.m_video.Visible        = true;
                this.m_comicsCom.Visible    = false;
                this.m_video.m_playComplete = delegate()
                {
                    EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_COMICS_1);
                    CSCartoonRewardRequest rewardReq = new CSCartoonRewardRequest();
                    GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(rewardReq);
                    //GlobalInfo.MY_PLAYER_INFO.PlayerTaskSystem.SyncTaskDetailInfo(1);
                };
                MessageHandler.RegisterMessageHandler(MessageDefine.SCCartoonRewardReqsponse, OnRes);

                return;
            }
            else
            {
                this.m_video.Visible     = false;
                this.m_comicsCom.Visible = true;
            }
            GOGUITools.GetAssetAction.SafeInvoke(testName, (prefabName, obj) =>
            {
                prefabName           = prefabName.Replace(".prefab", "");
                GameObject capterObj = obj as GameObject;
                capterObj.transform.localPosition = Vector3.zero;
                capterObj.transform.localScale    = Vector3.one;
                capterObj.transform.eulerAngles   = Vector3.one;
                capterObj.transform.SetParent(Transform, false);
                capterObj.transform.name = prefabName;
                this.m_maxPage           = capterObj.transform.childCount;
                m_Capter                 = Make <StartCartoonCapter>(prefabName);
                m_Capter.Visible         = true;
                this.m_curPage           = 1;
                this.m_pageLable.Text    = string.Format("{0}/{1}", this.m_curPage, this.m_maxPage);
                this.m_pageLable.Visible = true;
            }, LoadPriority.Default);
            this.m_nextBtn.AddClickCallBack(OnNextBtn);
        }
Esempio n. 3
0
 public void Win()
 {
     if (m_levels.Count > 0)
     {
         this.m_view.Refresh(m_levels.Dequeue());
     }
     else
     {
         CSCartoonRewardRequest req = new CSCartoonRewardRequest();
         OnScRequest(req);
     }
 }
Esempio n. 4
0
        public void Winnnn()
        {
            CSCartoonRewardRequest req = new CSCartoonRewardRequest();

            OnScRequest(req);
        }