예제 #1
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            long scan_id = 0;

            if (null != param)
            {
                List <long> my_param = param as List <long>;
                scan_id = my_param[0];
            }

            ConfFind scan_data = ConfFind.Get(scan_id);

            m_time_txt.Text = CommonTools.SecondToStringMMSS((double)scan_data.time);
            m_desc_txt.Text = LocalizeModule.Instance.GetString(scan_data.descs);

            Dictionary <int, HashSet <long> > scan_datas = ScanDataManager.Instance.Examin_clue_datas(scan_id);

            m_examine_grid.EnsureSize <ExamineItemView>(scan_datas.Keys.Count);

            int i = 0;

            foreach (var kvp in scan_datas)
            {
                int scan_type = kvp.Key;
                var item      = m_examine_grid.GetChild <ExamineItemView>(i);

                item.Refresh(ConfFindTypeIcon.Get(scan_type).icon, $"{ConfFindTypeIcon.Get(scan_type).name} {kvp.Value.Count}");
                item.Visible = true;
                ++i;
            }
        }
예제 #2
0
        void Refresh(long scan_id_)
        {
            ConfFind scan_data = ConfFind.Get(scan_id_);

            UpdateTime((double)scan_data.time);
            m_time_txt.Visible     = false;
            m_fly_time_txt.Text    = m_time_txt.Text;
            m_fly_time_txt.Visible = false;

            RefreshAnchors(scan_data);

            RefreshClueProgress(scan_data);
        }
예제 #3
0
        void LoadExamineClueData(long scan_id_)
        {
            ConfFind scan_data = ConfFind.Get(scan_id_);

            Dictionary <int, HashSet <long> > examin_clue_datas = new Dictionary <int, HashSet <long> >();

            if (0 != scan_data.findtype1)
            {
                if (examin_clue_datas.ContainsKey(scan_data.findtype1))
                {
                    Debug.LogError("重复的尸检线索种类");
                    return;
                }
                examin_clue_datas.Add(scan_data.findtype1, new HashSet <long>(scan_data.finds1));
            }

            if (0 != scan_data.findtype2)
            {
                if (examin_clue_datas.ContainsKey(scan_data.findtype2))
                {
                    Debug.LogError("重复的尸检线索种类");
                    return;
                }
                examin_clue_datas.Add(scan_data.findtype2, new HashSet <long>(scan_data.finds2));
            }

            if (0 != scan_data.findtype3)
            {
                if (examin_clue_datas.ContainsKey(scan_data.findtype3))
                {
                    Debug.LogError("重复的尸检线索种类");
                    return;
                }
                examin_clue_datas.Add(scan_data.findtype3, new HashSet <long>(scan_data.finds3));
            }

            m_all_examin_clue_datas.Add(scan_id_, examin_clue_datas);
        }
예제 #4
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            GameEvents.UIEvents.UI_Pause_Event.OnQuit                         += Quit;
            GameEvents.UIEvents.UI_Scan_Event.Listen_FindClue                 += FindClue;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RemoveClueAnchor         += RemoveClue;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RecycleDetailItemView    += RecycleDetailItemView;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RecycleFlyIconItemView   += RecycleFlyIconItemView;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ShowFlyIconItemView      += ShowFlyIconItemView;
            GameEvents.UIEvents.UI_Scan_Event.Listen_AddClueProgress          += AddClueProgress;
            GameEvents.UIEvents.UI_Scan_Event.Listen_VitEffectFinishFly       += RecycleFlyVitEffectAndPlayVitNum;
            GameEvents.UIEvents.UI_Scan_Event.Listen_RecycleFlyVitNumItemView += RecycleFlyVitNum;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ShowReward               += ShowReward;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ShakeFinished            += ShowVitIcon;
            GameEvents.UIEvents.UI_Scan_Event.Listen_ResumeGame               += Resume;

            m_fly_vit_ts.AddTweenCompletedCallback(FlyVitFinished);

            MessageHandler.RegisterMessageHandler(MessageDefine.SCFindRewardResp, OnScResponse);

            if (null != param)
            {
                List <long> my_param = param as List <long>;
                this.m_scan_id = my_param[0];
                this.m_task_id = my_param[1];
            }


            ConfFind scan_data = ConfFind.Get(m_scan_id);

            m_cur_time       = m_total_time = scan_data.time;
            m_total_clue_num = GetTotalClueNumAndContent(m_scan_id);
            m_cur_clue_num   = 0;
            cur_game_finded_clues.Clear();
            m_reward_vit_num = 0;
        }