Exemple #1
0
        public void Refresh(WinFailData data_)
        {
            m_mode = data_.m_mode;
            m_data = data_;

            RefreshLoseContent();
        }
Exemple #2
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            if (null != param)
            {
                var ret = param as WinFailData;

                this.m_mode = ret.m_mode;
                m_data      = ret;
            }

            m_close_btn.AddClickCallBack(OnCloseClicked);
        }
        public void Refresh(OfficerInfo info, Action <long> OnSelected_, ENUM_SEARCH_MODE mode_)
        {
            m_info        = info;
            m_on_selected = OnSelected_;

            ConfOfficer officer_data = ConfOfficer.Get(info.OfficerId);

            m_tex.TextureName = officer_data.portrait;
            m_name_txt.Text   = LocalizeModule.Instance.GetString(officer_data.name);
            m_name_txt.color  = PoliceUILogicAssist.GetPoliceQualityColor(officer_data.quality);


            if (ENUM_SEARCH_MODE.E_SEARCH_ROOM == mode_)
            {
                m_skill_root.Visible   = true;
                m_keyword_root.Visible = false;

                m_lvl_icon.Sprite = PoliceUILogicAssist.GetPoliceRankIcon(info.Level);
                string icon, desc;
                if (SkillUtil.GetCurLevelSkillIconAndDesc(info.OfficerId, info.Level, out icon, out desc))
                {
                    m_skill_lvl_txt.Text  = info.Level.ToString();
                    m_skill_icon.Sprite   = icon;
                    m_skill_desc_txt.Text = desc;
                }
            }
            else if (ENUM_SEARCH_MODE.E_EVENTGAME == mode_)
            {
                m_skill_root.Visible   = false;
                m_keyword_root.Visible = true;
                m_lvl_icon.Sprite      = PoliceUILogicAssist.GetPoliceRankIcon(info.Level);
                List <long> keywords_id = EventGameUIAssist.GetPoliceKeyWordByOfficerID(info.OfficerId);
                m_keyword_grid.EnsureSize <EventGameKeywordItemView>(keywords_id.Count);

                for (int i = 0; i < m_keyword_grid.ChildCount; ++i)
                {
                    m_keyword_grid.GetChild <EventGameKeywordItemView>(i).Refresh(i, keywords_id[i]);
                    m_keyword_grid.GetChild <EventGameKeywordItemView>(i).Visible = true;
                }
            }
        }
Exemple #4
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            if (null != param)
            {
                var ret = param as WinFailData;

                this.m_mode = ret.m_mode;
                m_data      = ret;
            }
            m_win_continue_btn.AddClickCallBack(ContinueClicked);

            //m_win_effect.Visible = true;

            m_lvl_up_reward_view.gameObject.transform.localPosition = Vector3.zero;
            m_lvl_up_reward_cg.alpha = 1.0f;


            m_cur_step = 0;
            UiStepTo(++m_cur_step);
        }
        public override void OnShow(object param)
        {
            base.OnShow(param);


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

            GameEvents.UI_Guid_Event.OnSceneShowResult += OnSceneShowResult;

            EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_GAME_MAIN_SETTING);

            GameEvents.TaskEvents.OnBlockSyncTask.SafeInvoke(true);

            m_is_win = false;

            if (null != param)
            {
                var ret = param as WinFailData;

                this.m_mode = ret.m_mode;
                m_data      = ret;
                m_add_exp   = 0;

                if (ENUM_SEARCH_MODE.E_JIGSAW == this.m_mode)
                {
                    var msg = ret.m_msg as SCFinishResponse;

                    if (0 == msg.Result)
                    {
                        EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.jigsaw_done.ToString());
                        this.ShowWin(ret);

                        if (0 != msg.PropId)
                        {
                            GlobalInfo.MY_PLAYER_INFO.AddSingleBagInfo(msg.PropId, 1);

                            GameEvents.UIEvents.UI_GameEntry_Event.Listen_OnCombinePropCollected.SafeInvoke();
                        }
                    }
                    else
                    {
                        this.ShowFail(ret);
                    }
                }
                else if (ENUM_SEARCH_MODE.E_CARTOON == this.m_mode)
                {
                    var msg = ret.m_msg as SCCartoonRewardReqsponse;
                    EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.sucess.ToString());
                    this.ShowWin(ret);
                }
                else if (ENUM_SEARCH_MODE.E_SEARCH_ROOM == this.m_mode)
                {
                    InputModule.Instance.Enable = false;
                    var msg = ret.m_msg as SCSceneRewardResponse;
                    GameEvents.UI_Guid_Event.OnFindSceneResult.SafeInvoke(msg.SceneId > 0);
                    if (msg.SceneId > 0)
                    {
                        EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.sucess.ToString());
                        this.ShowWin(ret);

                        foreach (var item in msg.GiftItems)
                        {
                            GlobalInfo.MY_PLAYER_INFO.AddSingleBagInfo(item.ItemId, item.Num);
                        }

                        GameEvents.UIEvents.UI_GameEntry_Event.Listen_OnCombinePropCollected.SafeInvoke();
                    }
                    else
                    {
                        this.ShowFail(ret);
                    }
                }
            }
        }
Exemple #6
0
 public void Refresh(WinFailData data_)
 {
     m_mode = data_.m_mode;
     m_data = data_;
 }
Exemple #7
0
 public WinFailData(ENUM_SEARCH_MODE mode_, IMessage msg_)
 {
     m_mode = mode_;
     m_msg  = msg_;
 }