Esempio n. 1
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            GameEvents.UIEvents.UI_Bonus_Pop_View_Event.Tell_OnBlock.SafeInvoke(true);

            if (null != param)
            {
                m_data = param as SceneLevelUpData;

                SCSceneRewardResponse msg = (SCSceneRewardResponse)m_data.msg;
                m_view.Visible = true;
                m_view.Refresh(msg);

                this.AddProp(msg);
            }
        }
Esempio n. 2
0
        private void OnSCGameCurrencyResponse(object msgResponse)
        {
            Dictionary <UBSParamKeyName, object> _params = new Dictionary <UBSParamKeyName, object>()
            {
                { UBSParamKeyName.TotalTime, ((GameSceneBase)CurrentScene).GetElapseTime() },
                { UBSParamKeyName.Error_Times, ((GameSceneBase)CurrentScene).TotalErrorTimes },
                { UBSParamKeyName.Punish_Times, ((GameSceneBase)CurrentScene).GetPunishTime() },
            };

            UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.game_time, null, _params);


            SCSceneRewardResponse _msg = msgResponse as SCSceneRewardResponse;

            TimeModule.Instance.SetTimeout(() =>
            {
                if (!MsgStatusCodeUtil.OnError(_msg.ResponseStatus))
                {
                    if (0 == _msg.UpLevelRewards.Count)
                    {
                        WinFailData data = new WinFailData(ENUM_SEARCH_MODE.E_SEARCH_ROOM, _msg);

                        FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_WIN);

                        param.Param = data;

                        EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);

                        Dictionary <UBSParamKeyName, object> _param = new Dictionary <UBSParamKeyName, object>();
                        _param.Add(UBSParamKeyName.Success, _msg.SceneId > 0 ? 1 : 0);
                        _param.Add(UBSParamKeyName.SceneID, SceneModule.Instance.SceneData.id);
                        UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.game_finish, _msg.SceneId > 0 ? 1 : 0, _param);

                        if (_msg.SceneId < 0)
                        {
                            //PushGiftManager.Instance.TurnOn(ENUM_PUSH_GIFT_BLOCK_TYPE.E_SEEK);
                        }
                    }
                    else
                    {
                        SceneLevelUpData data = new SceneLevelUpData()
                        {
                            msg         = _msg,
                            m_click_act = null,
                        };

                        FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_SCENE_LEVEL_UP);
                        param.Param = data;

                        EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
                    }
                }
                else
                {
                    SCSceneRewardResponse rsp = new SCSceneRewardResponse();
                    rsp.SceneId                 = -1;
                    WinFailData data            = new WinFailData(ENUM_SEARCH_MODE.E_SEARCH_ROOM, rsp);
                    FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_WIN);
                    param.Param                 = data;
                    EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);

                    Dictionary <UBSParamKeyName, object> _param = new Dictionary <UBSParamKeyName, object>();
                    _param.Add(UBSParamKeyName.Success, 0);
                    _param.Add(UBSParamKeyName.Description, _msg.ResponseStatus.Code);
                    _param.Add(UBSParamKeyName.SceneID, SceneModule.Instance.SceneData.id);
                    UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.game_finish, null, _param);

                    //PushGiftManager.Instance.TurnOn(ENUM_PUSH_GIFT_BLOCK_TYPE.E_SEEK);
                }
            }, 2.5f);
        }