コード例 #1
0
        public static bool GetConfig(string fieldName, object fieldValue, out ConfCartoonScene config)
        {
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_CartoonScene", fieldName, fieldValue);

            if (sqReader != null)
            {
                try
                {
                    sqReader.Read();
                    if (sqReader.HasRows)
                    {
                        config = GetConfByDic(sqReader);
                    }
                    else
                    {
                        config = null;
                        return(false);
                    }
                    return(true);
                }
                catch (Exception ex)
                {
                    SqliteDriver.SQLiteHelper.OnError(string.Format("CartoonScene 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex));
                }
                config = null;
                return(false);
            }
            config = null;
            return(false);
        }
コード例 #2
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            MessageHandler.RegisterMessageHandler(MessageDefine.SCCartoonRewardReqsponse, OnScResponse);


            m_cartoon_id = (long)param;

            ConfCartoonScene data;

            ConfCartoonScene.GetConfig(m_cartoon_id, out data);

#if !TEST
            string[] lvls = data.sceneInfoIds;

            m_levels = new Queue <long>();
            foreach (string lvl in lvls)
            {
                if (!string.IsNullOrEmpty(lvl))
                {
                    m_levels.Enqueue(long.Parse(lvl));
                }
            }
#else
            m_levels = new Queue <long>();
            m_levels.Enqueue(1001);
            m_levels.Enqueue(1002);
#endif


            this.m_view.Refresh(m_levels.Dequeue());
        }
コード例 #3
0
        public void OpenStartCartoonForID(long id)
        {
            ContextId = id;
            ConfCartoonScene confScene = ConfCartoonScene.Get(ContextId);

            if (confScene == null && confScene.sceneInfoIds.Length == 0)
            {
                return;
            }
            CSCartoonEnterRequest enterReq = new CSCartoonEnterRequest();

            enterReq.SceneId = ContextId;
            GameEvents.NetWorkEvents.SendMsg.SafeInvoke(enterReq);
        }
コード例 #4
0
 private static void GetArrrayList()
 {
     if (cacheArray.Count <= 0)
     {
         DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_CartoonScene");
         if (sqReader != null)
         {
             while (sqReader.Read())
             {
                 ConfCartoonScene _conf = GetConfByDic(sqReader);
                 cacheArray.Add(_conf);
                 dic[_conf.id] = _conf;
             }
             resLoaded = true;
         }
     }
 }
コード例 #5
0
        private void OnResponse(object obj)
        {
            if (obj is SCCartoonEnterResponse)
            {
                SCCartoonEnterResponse res = obj as SCCartoonEnterResponse;
                if (!MsgStatusCodeUtil.OnError(res.Result))
                {
                    Dictionary <UBSParamKeyName, object> enterSceneFromChapterMapDict = new Dictionary <UBSParamKeyName, object>();
                    enterSceneFromChapterMapDict.Add(UBSParamKeyName.EnterSceneFromChapter, this.ContextId);
                    UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.carton_star, null, enterSceneFromChapterMapDict);

                    FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_COMICS_1);
                    param.Param = ConfCartoonScene.Get(ContextId).sceneInfoIds[0];
                    EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
                }
            }
        }
コード例 #6
0
        public static bool GetConfig(long id, out ConfCartoonScene config)
        {
            if (dic.TryGetValue(id, out config))
            {
                return(config != null);
            }
            if (cacheLoaded)
            {
                config = null;
                return(false);
            }
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_CartoonScene", id);

            if (sqReader != null)
            {
                try
                {
                    sqReader.Read();
                    if (sqReader.HasRows)
                    {
                        config = GetConfByDic(sqReader);
                    }
                    else
                    {
                        dic[id] = null;
                        config  = null;
                        return(false);
                    }
                    dic[id] = config;
                    return(true);
                }
                catch (Exception ex)
                {
                    SqliteDriver.SQLiteHelper.OnError(string.Format("CartoonScene 表找不到SN={0} 的数据\n{1}", id, ex));
                }
                config = null;
                return(false);
            }
            else
            {
                config = null;
                return(false);
            }
        }
コード例 #7
0
        private static ConfCartoonScene GetConfByDic(DataTable reader)
        {
            long id         = reader.GetInt64(0);
            int  rewardVit  = reader.GetInt32(1);
            int  rewardExp  = reader.GetInt32(2);
            int  rewardCoin = reader.GetInt32(3);
            int  rewardCash = reader.GetInt32(4);

            string[] sceneInfoIds = (string[])reader.GetArrayData(5, 12);
            string   thumbnail    = reader.GetString(6);
            string   name         = reader.GetString(7);

            ConfCartoonScene new_obj_ConfCartoonScene = new ConfCartoonScene(id,
                                                                             rewardVit,
                                                                             rewardExp,
                                                                             rewardCoin,
                                                                             rewardCash,
                                                                             sceneInfoIds,
                                                                             thumbnail,
                                                                             name
                                                                             );

            return(new_obj_ConfCartoonScene);
        }
コード例 #8
0
ファイル: ConfFact.cs プロジェクト: kingpowervrg/my_seeker
 public static void Register()
 {
     ConfAchievement.Init();
     ConfActiveDrop.Init();
     ConfActivityBase.Init();
     ConfAssetManifest.Init();
     Confbranchtask.Init();
     ConfBuilding.Init();
     ConfCartoonScene.Init();
     ConfChapter.Init();
     ConfCharge.Init();
     ConfChat.Init();
     ConfChatItem.Init();
     ConfCheckIn.Init();
     ConfCombineFormula.Init();
     ConfDemoScene.Init();
     ConfDropOut.Init();
     ConfPropGiftItem0.Init();
     ConfPropGiftItem1.Init();
     ConfPropGiftItem2.Init();
     ConfDropOut2.Init();
     Confetl.Init();
     ConfEvent.Init();
     ConfEventAttribute.Init();
     ConfEventPhase.Init();
     Confexhibit.Init();
     ConfExpToLevel.Init();
     Conffailtips.Init();
     ConfFeedback.Init();
     ConfFind.Init();
     ConfFindClue.Init();
     ConfFindTypeIcon.Init();
     ConfGMCMD.Init();
     ConfGuid.Init();
     ConfGuidArt.Init();
     ConfGuidNew.Init();
     ConfGuidNewFunction.Init();
     Confinapppurchase.Init();
     ConfJigsawScene.Init();
     ConfKeyWords.Init();
     ConfLanguage.Init();
     ConfMsgCode.Init();
     ConfNode.Init();
     ConfNpc.Init();
     ConfOfficer.Init();
     ConfPath.Init();
     ConfPoliceRankIcon.Init();
     ConfProp.Init();
     ConfPropGift.Init();
     ConfPropGiftItem0.Init();
     ConfPropGiftItem1.Init();
     ConfPropGiftItem2.Init();
     ConfPush.Init();
     ConfReasoning.Init();
     ConfScene.Init();
     ConfSceneDifficulty.Init();
     ConfSceneSpecial.Init();
     ConfServiceConfig.Init();
     ConfSkill.Init();
     ConfSkyEye.Init();
     ConfSound.Init();
     ConfTask.Init();
     ConfTitle.Init();
 }
コード例 #9
0
ファイル: GameRoot.cs プロジェクト: kingpowervrg/my_seeker
        private void OnGUI()
        {
            if (!needShowGUI)
            {
                return;
            }
            if (enable)
            {
                GUILayout.BeginArea(new Rect(10, gui_start_y, 300, Screen.height));

                scene_txt = GUILayout.TextField(scene_txt, GUILayout.Width(150), GUILayout.Height(40));

                if (GUILayout.Button("seek", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    if (!string.IsNullOrEmpty(scene_txt))
                    {
                        long scene_id;
                        if (long.TryParse(scene_txt, out scene_id))
                        {
                            //GameIAPModule.Instance.OnTransactionDone.SafeInvoke(ConfCharge.Get(scene_id).desc);
                            CommonHelper.OpenEnterGameSceneUI(scene_id);
                        }
                    }
                }


                progresssTex = GUILayout.TextField(progresssTex, GUILayout.Width(150), GUILayout.Height(40));

                if (GUILayout.Button("progresssTex", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    SeekerGame.NewGuid.GuidNewManager.Instance.TestProgressIndex(int.Parse(progresssTex));
                }
                if (GUILayout.Button("SkipCurrentCapter", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    GameEvents.UIEvents.UI_StartCartoon_Event.OnSkipCurrentCapter.SafeInvoke();
                }
                if (GUILayout.Button("EnterCartoon", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_COMICS_1);
                    param.Param = ConfCartoonScene.Get(40008).sceneInfoIds[0];
                    EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
                }
                buildName = GUILayout.TextField(buildName, GUILayout.Width(150), GUILayout.Height(40));
                if (GUILayout.Button("UnLock", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    GameEvents.BigWorld_Event.OnUnLock.SafeInvoke(buildName);
                }
                if (GUILayout.Button("EnterTalk", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    SceneModule.Instance.EnterExhibitionHallScene();
                    //PresuadeUILogic.Show(1000);
                    //ReasoningUILogic.ShowReasonUIById(1);
                    //GameEvents.UIEvents.UI_GameEntry_Event.OnNewPoliceEffect.SafeInvoke(true);
                    //TalkUIHelper.OnStartTalk(int.Parse(buildName));
                    //GameEvents.UIEvents.UI_GameEntry_Event.OnLockMainIcon.SafeInvoke(int.Parse(buildName),true);
                }
                if (GUILayout.Button("ShowReasonUIById", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    ///PresuadeUILogic.Show(1000);
                    ReasoningUILogic.ShowReasonUIById(1);
                    //GameEvents.UIEvents.UI_GameEntry_Event.OnNewPoliceEffect.SafeInvoke(true);
                    //TalkUIHelper.OnStartTalk(int.Parse(buildName));
                    //GameEvents.UIEvents.UI_GameEntry_Event.OnLockMainIcon.SafeInvoke(int.Parse(buildName),true);
                }
                if (GUILayout.Button("SkyeyeUILogic", GUILayout.Width(150), GUILayout.Height(40)))
                {
                    SkyeyeUILogic.Show();
                }
                GUILayout.EndArea();
            }
        }