import { _decorator, Component, Node, sys } from 'cc'; import { scene_item_data, widget_item_data } from '../data/data'; const { ccclass, property } = _decorator; export class config { static debug = true; static is_zb = false; //是否是主播模式 static gameID = 10000; static gameName = "神秘的笔记"; static Platform = { BROWSER:"BROWSER", TT:"TOUTIAO", WX:"WEIXIN", KS:"KS", } static PLATFORM_IDENTIFY = { //平台标识 BROWSER: 'browser', TT:'douyin', WX:'wx', KS:'ks', } static LevelType = { LEVEL:0, //关卡 LONG_STORY:1, //长篇 } static select_res_and_control_type = { RES_TYPE:0, CONTROL_TYPE:1, SCENE_SELECT:2,//场景选择 TASK:3,//任务 } static select_res_btn_type = { ITEM_LIST:0, COMPONENT_LIST:1, BG_LIST:2, SOUND_LIST:3, } static Event = { PLAY_SOUND:"PLAY_SOUND", DragWidget:"DragWidget", DragRes:"DragRes", DragWidgetEnd:"DragWidgetEnd", DragResEndOnCheck:"DragResEndOnCheck", DragResEnd:"DragResEnd", UpdateSceneList:"UpdateSceneList", UpdateEditScene:"UpdateEditScene", UpdateAttributes:"UpdateAttributes", UpdateAttributesToView:"UpdateAttributesToView", RemoveWidget:"RemoveWidget", updateWidgetData:"updateWidgetData", ChangeSelectPage:"ChangeSelectPage", ShowWidgetList:"ShowWidgetList" } public static init(){ //控件 config.Widget_Type.set(config.Widget_Type_List.CLICK_TYPE,new widget_item_data("点击",this.Widget_Type_List.CLICK_TYPE)) config.Widget_Type.set(config.Widget_Type_List.SLIDE_TYPE,new widget_item_data("滑动",this.Widget_Type_List.SLIDE_TYPE)) config.Widget_Type.set(config.Widget_Type_List.DRAG_TYPE,new widget_item_data("拖拽",this.Widget_Type_List.DRAG_TYPE)) config.Widget_Type.set(config.Widget_Type_List.IMG_TYPE,new widget_item_data("图片",this.Widget_Type_List.IMG_TYPE)) config.Widget_Type.set(config.Widget_Type_List.ACTION_TYPE,new widget_item_data("动画",this.Widget_Type_List.ACTION_TYPE)) config.Widget_Type.set(config.Widget_Type_List.UI_TOP,new widget_item_data("弹窗",this.Widget_Type_List.UI_TOP)) config.Widget_Type.set(config.Widget_Type_List.TEXT_SOUND,new widget_item_data("文字和语音",this.Widget_Type_List.TEXT_SOUND)) config.Widget_Type.set(config.Widget_Type_List.QUESTION_SELECT,new widget_item_data("问题选择",this.Widget_Type_List.QUESTION_SELECT)) config.Widget_Type.set(config.Widget_Type_List.COUNT_DOWN,new widget_item_data("倒计时",this.Widget_Type_List.COUNT_DOWN)) //场景 config.SceneType.set(config.Scene_Type_List.single_screen,new scene_item_data("独立场景",config.Scene_Type_List.single_screen,true)) config.SceneType.set(config.Scene_Type_List.many_screen_switch_up_down,new scene_item_data("多场景-上下",config.Scene_Type_List.many_screen_switch_up_down)) config.SceneType.set(config.Scene_Type_List.many_screen_switch_left_rigth,new scene_item_data("多场景-左右",config.Scene_Type_List.many_screen_switch_left_rigth)) //slide_type config.slide_type_map.set(config.slide_type.down,"下") config.slide_type_map.set(config.slide_type.up,"上") config.slide_type_map.set(config.slide_type.left,"左") config.slide_type_map.set(config.slide_type.right,"右") config.slide_type_map.set(config.slide_type.up_down,"上下") config.slide_type_map.set(config.slide_type.left_right,"左右") //clcik_type_map config.clcik_type_map.set(config.clcik_type.Multiple_clicks,"多次点击") config.clcik_type_map.set(config.clcik_type.Press_and_hold,"长按") config.clcik_type_map.set(config.clcik_type.click,"单击") config.clcik_type_map.set(config.clcik_type.click_not_auto_finish,"单击(不自动完成)") //event_type_map config.event_type_map.set(config.event_type.play_ani,"播放动画") config.event_type_map.set(config.event_type.top_view,"弹窗") config.event_type_map.set(config.event_type.top_view_hide,"弹窗隐藏") config.event_type_map.set(config.event_type.text_sound,"出现文字及语音") config.event_type_map.set(config.event_type.change_one_item_status,"改变指定道具状态") config.event_type_map.set(config.event_type.show_new_item,"出现新道具") config.event_type_map.set(config.event_type.show_question_select,"出现问题选择") config.event_type_map.set(config.event_type.countdown_over,"倒计时结束") config.event_type_map.set(config.event_type.active_event,"激活交互") config.event_type_map.set(config.event_type.stop_active_event,"停用交互") config.event_type_map.set(config.event_type.start_event,"开始事件") config.event_type_map.set(config.event_type.collect_event,"收集事件") config.event_type_map.set(config.event_type.be_event,"被动触发事件") config.event_type_map.set(config.event_type.hide,"隐藏") config.event_type_map.set(config.event_type.delay_exe_event,"延迟时间调用一个事件") config.event_type_map.set(config.event_type.fail_event,"失败事件") config.event_type_map.set(config.event_type.play_sound,"播放音效") config.event_type_map.set(config.event_type.show_scene_title,"显示场景标签") config.event_type_map.set(config.event_type.scene_ani,"场景动画") config.event_type_map.set(config.event_type.stop_play_loop_sound,"停止播放一个音效") config.event_type_map.set(config.event_type.delete_drag_other_data,"删除拖拽控件的其他拖拽目标") //top_view_type_map config.top_view_type_map.set(config.top_view_type.__null,"暂未选择") config.top_view_type_map.set(config.top_view_type.not_have_interact,"没有交互") config.top_view_type_map.set(config.top_view_type.interact_input,"输入验证") config.top_view_type_map.set(config.top_view_type.interact_page,"多页面切换") config.top_view_type_map.set(config.top_view_type.interact_puzzle,"拼图") config.top_view_type_map.set(config.top_view_type.interact_scene,"场景") config.top_view_type_map.set(config.top_view_type.pointer_ding_wei,"指针定位") config.top_view_type_map.set(config.top_view_type.wei_chi_pointer,"维持指针") config.top_view_type_map.set(config.top_view_type.boss_info,"boss属性") //question_type_map config.question_type_map.set(config.question_type.two,"2") config.question_type_map.set(config.question_type.three,"3") config.question_type_map.set(config.question_type.four,"4") //task_type_map config.task_type_map.set(config.task_type.zhao_xi_jie,"找细节-说明:在图中找指定的细节") config.task_type_map.set(config.task_type.guo_ju_qing,"过剧情-带规则-说明:按照剧情提示进行操作") config.task_type_map.set(config.task_type.da_guai,"打怪-说明:使用场上的道具攻击怪物") config.task_type_map.set(config.task_type.guo_du,"过度场景-说明:无答案、无提示进行操作") config.task_type_map.set(config.task_type.guo_ju_qing_not_rule,"过剧情-无规则-说明:按照剧情提示进行操作") config.task_type_map.set(config.task_type.guo_ju_qing_dai_dao_ju,"过剧情-带道具-说明:按照剧情进行道具交互") //Zindex_type_map config.Zindex_type_map.set(config.Zindex_type.Zindex_scene,"场景层") config.Zindex_type_map.set(config.Zindex_type.Zindex_ui,"界面UI层") config.Zindex_type_map.set(config.Zindex_type.zIndex_top,"弹出层") //widget_scale_dir_map config.widget_scale_dir_map.set(config.widget_scale_dir.up,"向下") config.widget_scale_dir_map.set(config.widget_scale_dir.left,"向左") config.widget_scale_dir_map.set(config.widget_scale_dir.normal,"正常") } static Widget_Type:Map = new Map(); static Widget_Type_List = { CLICK_TYPE:0, //点击 SLIDE_TYPE:1, //滑动 DRAG_TYPE:2, //拖拽 IMG_TYPE:3, //图片 ACTION_TYPE:4, //动画 UI_TOP:5, //弹窗 TEXT_SOUND:6, // 文本和语音 QUESTION_SELECT:7, //问题选择 COUNT_DOWN:8, //倒计时 CONTAINER_LAYER:9, //容器层 } static SceneType:Map = new Map(); static Scene_Type_List = { single_screen:0, //独立场景 many_screen_switch_up_down:1, //多场景-上下 many_screen_switch_left_rigth:2, //多场景-左右 } static attributes_type = { widget:0, scene:1, } static attributes_list_type = { pos:"pos", size:"size", url:"url", origin:"origin", delete:"delete", drag:"drag_size", drag_err_back_status:"drag_err_back_status", slide:"slide", click:"click", is_interaction:"is_interaction", animation:"animation", find_widget_pos:"find_widget_pos", active:"active", top:"top", text_sound:"text_sound", question_select:"question_select", count_down:"count_down", zIndex:"zIndex", dir:"dir", show:"show", scene_rule_tips:"scene_rule_tips", remark:"remark", rotation:"rotation", anchor:"anchor", show_more_scene_arrow:"show_more_scene_arrow", } static last_id:number = 0; static getNewId(){ config.last_id+=1 return config.last_id; } static slide_type_map:Map = new Map(); static slide_type = { up:0, //上 down:1, //下 left:2, //左 right:3, //右 up_down:4, //上下 left_right:5, //左右 } static clcik_type_map:Map = new Map(); static clcik_type = { Press_and_hold:0, //长按 Multiple_clicks:1, //多次点击 click:2,//单击 click_not_auto_finish:3,//单击(不自动完成) } static task_type_map:Map = new Map(); static task_type = { zhao_xi_jie:0, //找细节-说明:在图中找指定的细节 guo_ju_qing:1, //过剧情-带规则-说明:按照剧情提示进行操作 da_guai:2, //打怪-说明:使用场上的道具攻击怪物 guo_du:3, //过度场景-说明:无答案、无提示进行操作 guo_ju_qing_not_rule:4, //过剧情-无规则-说明:按照剧情提示进行操作 guo_ju_qing_dai_dao_ju:5, //过剧情-带道具-说明:按照剧情进行道具交互 } static zhao_xi_jie_tip_type = { select_tips:0, //单个提示 , 点击到对应的收集内容,出现提示按钮 select_all:1,//选中全部,提出一个二级界面,出现两个选择,每个选择对应的提示可以配置。 //分别点击没有效果 只能点击提示按钮 } static event_type_map:Map = new Map(); static event_type = { play_ani:0,//播放动画 top_view:1,//弹窗 text_sound:2,//出现文字及语音 change_one_item_status:3,//改变指定道具状态 show_new_item:4,//出现新道具 show_question_select:5,//出现问题选择 start_event:6, //开始事件 collect_event:7,//收集事件 多组件完成触发 active_event:8, //激活 stop_active_event:9, //停用交互 countdown_over:10, //倒计时结束 be_event:11, //被动触发事件 hide:12, //触发让控件隐藏 delay_exe_event:13, //延迟多久执行一个事件 fail_event:14, //失败 play_sound:15, //播放一个音效 show_scene_title:16,//显示场景的标签 scene_ani:17,//场景动画 delete_drag_other_data:18,//删除其他拖拽目标的属性 stop_play_loop_sound:19,//停止一个音效 switch_scene_event:20, //多场景-切换场景事件 more_scene_is_show_arrow_event:21, //多场景-是否显示箭头事件 more_scene_jump_assigned_page_event:22, //多场景-跳转指定页数事件 top_view_hide:23,//弹窗隐藏 collect_event_score:24, //收集事件-分数 collect_widget_score:25, //收集多个控件-分数 delete_collect_widget_score_assigned_widget:26, //删除收集控件-分数的指定控件 event_group:100, //事件组 } static top_view_type_map:Map = new Map(); static top_view_type = { __null:-1, //默认空 not_have_interact:0,//没有交互 interact_input:1,//输入验证 interact_page:2,//多页面切换 - 左右 interact_puzzle:3,//拼图 interact_scene:4,//场景 pointer_ding_wei:5,//指针定位 wei_chi_pointer:6,//维持指针 boss_info:7, //boss 属性 } static question_type_map:Map = new Map(); static question_type = { two:2,// 2个 three:3,// four:4,// } static update_type = { update_all:0, update_img:1, update_info:2, } static Zindex_type_map:Map = new Map(); static Zindex_type = { Zindex_scene:0, //场景曾 Zindex_ui:1, //ui层 zIndex_top:2, // 弹出层 } static widget_scale_dir_map:Map = new Map(); static widget_scale_dir = { //控件的方向 left:0, //左边 -1 normal:1, //右边 1 up:2, // 上 1 } static switch_scene_page_direction = { //切换场景分页方向 unknown:-1, //未知 up:1, //上 down:2, //下 left:3, //左 right:4, //右 } static EventRun = { NOTICE_EVENT:"NOTICE_EVENT", //通知任务事件 WIDGET_FINISH:"WIDGET_FINISH", //控件完成了自己本身的任务 WIDGET_FAIL:"WIDGET_FAIL", //失败 WIDGET_HIDE:"WIDGET_HIDE", //隐藏 WIDGET_DRAG_OTHER_FINISH:"WIDGET_DRAG_OTHER_FINISH", //控件拖拽其他完成 WIDGET_QUESTION_SELECT_FINISH:"WIDGET_QUESTION_SELECT_FINISH", //控件问题选择完成 SHOW_ZHAO_BU_TONG_FINISH_STATUS:"SHOW_ZHAO_BU_TONG_FINISH_STATUS", // ON_ZHAO_BU_TONG_ALL_FINISH:"ON_ZHAO_BU_TONG_ALL_FINISH", //找细节所有完成 TOP_VIEW_CLOSE:"TOP_VIEW_CLOSE", //弹窗关闭 TOP_VIEW_FINISH:"TOP_VIEW_FINISH", //弹窗完成 TOP_VIEW_FAIL:"TOP_VIEW_FAIL", //弹窗失败 TOP_VIEW_HIDE:"TOP_VIEW_HIDE", //弹窗隐藏 TOP_VIEW_ALL_HIDE:"TOP_VIEW_ALL_HIDE", //弹窗所有隐藏 ON_WIDGET_FINISH_COLLECT_EVENT:"ON_WIDGET_FINISH_COLLECT_EVENT", //当控件完成事件 ON_COUNT_DOWN_FAIL:"ON_COUNT_DOWN_FAIL", //倒计时结束 失败 ON_COUNT_DOWN_START:"ON_COUNT_DOWN_START", //倒计时开始 ON_SHOW_RULE_BTN:"ON_SHOW_RULE_BTN", //显示规则按钮 ON_BOSS_HURT:"ON_BOSS_HURT", //boss被攻击 ON_WIN:"ON_WIN", //胜利 SHOW_TIPS:"SHOW_TIPS", //显示一个提示 TOGGLE_YIN_YUE:"TOGGLE_YIN_YUE", //开关音乐 UPDATE_FREE_TIME_STATUS:"UPDATE_FREE_TIME_STATUS", //更新免费时间状态 WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL:"WIN_LATER_AUTO_UNLOCK_NEXT_LEVEL", //获胜后自动解锁下一个关卡 } static MSG_CODE = { SUCCESS: 10000, } static BACK_GAME_STATUS = { NORMAL: 1, WIN: 2, FAIL: 3, } static AD_TYPE = { UNKNOWN: "UNKNOWN", RE_LIFE:"RE_LIFE", ANSWER:"ANSWER", LOOK_TIPS:"LOOK_TIPS", UN_LOCK_24:"UN_LOCK_24", UN_LOCK:"UN_LOCK", ADD_TIME:"ADD_TIME", } static TOKEN:string = "" static USER_DATA:string = "userData" static ZB_OPENID:string = "zbOpenid" static USER_SELECT_LONG_STORY_DATA:String = "userSelectLongStoryData" static TT_SHARE_TEMPLATEID:String = "i6e10hgb28e41bj68g" static TT_REWARD ={ RE_LIFE: "122kafg9cd5f187ib3", ANSWER: "j6abe2594e84399f4k", LOOK_TIPS: "f6o78gcl7mec09m3b8", UN_LOCK_24: "38vhsipa5qe3tkpnve", UN_LOCK: "52kg38k634094h9b19", ADD_TIME: "4ji5k7gbe5mge42657", } static WX_REWARD ={ RE_LIFE: "adunit-788ad64a4f286d77", ANSWER: "adunit-827194bea976660c", LOOK_TIPS: "adunit-2fc1d3fe1b353cca", UN_LOCK_24: "adunit-88f2edf4eff39a58", UN_LOCK: "adunit-069f2af8ac86ec3b", ADD_TIME: "adunit-57d1593a3cea5c9d", } static KS_REWARD ={ RE_LIFE: "2300005827_01", ANSWER: "2300005827_01", LOOK_TIPS: "2300005827_01", UN_LOCK_24: "2300005827_01", UN_LOCK: "2300005827_01", ADD_TIME: "2300005827_01", } static STATISTICS_ACTION_TYPE = { UNKNOWN: 0, //未知 GUAN_KA_FU_HUO: 1, //关卡复活 CHA_KAN_DA_AN: 2, //查看答案 CHA_KAN_TI_SHI: 3, //查看提示 LIN_SHI_24_XIAO_SHI: 4, //临时24小时 TI_QIAN_JIE_SUO: 5, //提前解锁 ADD_TIME: 6, //加时间 } static User_unlock_levels_number_status = { GET: 0, //获取 SYNC: 1, //同步 RECEIVE: 2, //领取 } }