future преди 1 година
родител
ревизия
e09dc93a55
променени са 2 файла, в които са добавени 103 реда и са изтрити 35 реда
  1. 59 1
      assets/script/config.ts
  2. 44 34
      assets/script/edit/search/search_node.ts

+ 59 - 1
assets/script/config.ts

@@ -267,6 +267,65 @@ export class config {
         event_group:100, //事件组
     }
 
+    static get_event_type_name(type=config.event_type.play_ani):string {
+        let string = ''
+        switch (type) {
+            case config.event_type.play_ani: string = '播放动画'
+                break;
+            case config.event_type.top_view: string = '弹窗' 
+                break;
+            case config.event_type.text_sound: string = '文字及语音' 
+                break;
+            case config.event_type.change_one_item_status: string = '改变指定道具资源' 
+                break;
+            case config.event_type.show_new_item: string = '出现新道具' 
+                break;
+            case config.event_type.show_question_select: string = '出现问题选择' 
+                break;
+            case config.event_type.start_event: string = '开始事件' 
+                break;
+            case config.event_type.collect_event: string = '收集事件' 
+                break;
+            case config.event_type.active_event: string = '激活' 
+                break;
+            case config.event_type.stop_active_event: string = '停用交互' 
+                break;
+            case config.event_type.countdown_over: string = '倒计时结束' 
+                break;
+            case config.event_type.be_event: string = '被动触发事件' 
+                break;
+            case config.event_type.hide: string = '触发让控件隐藏' 
+                break;
+            case config.event_type.delay_exe_event: string = '延迟多久执行一个事件' 
+                break;
+            case config.event_type.fail_event: string = '失败' 
+                break;
+            case config.event_type.play_sound: string = '播放一个音效' 
+                break;
+            case config.event_type.show_scene_title: string = '显示场景的标签' 
+                break;
+            case config.event_type.scene_ani: string = '场景动画' 
+                break;
+            case config.event_type.delete_drag_other_data: string = '删除其他拖拽目标的属性' 
+                break;
+            case config.event_type.stop_play_loop_sound: string = '停止一个音效' 
+                break;
+            case config.event_type.switch_scene_event: string = '多场景-切换场景事件' 
+                break;
+            case config.event_type.more_scene_is_show_arrow_event: string = '多场景-是否显示箭头事件' 
+                break;
+            case config.event_type.more_scene_jump_assigned_page_event: string = '多场景-跳转指定页数事件' 
+                break;
+            case config.event_type.top_view_hide: string = '弹窗隐藏' 
+                break;
+            case config.event_type.event_group: string = '事件组' 
+                break;
+            default:
+                break;
+        }
+        return string
+    }
+
     static top_view_type_map:Map<number,string> = new Map();
 
     static top_view_type = {
@@ -279,7 +338,6 @@ export class config {
         pointer_ding_wei:5,//指针定位
         wei_chi_pointer:6,//维持指针
         boss_info:7, //boss 属性
-
     }
 
 

+ 44 - 34
assets/script/edit/search/search_node.ts

@@ -53,95 +53,108 @@ export class search_node extends Component {
         if(c_event_item==null){
             return
         }
-        let c_title = ""
+        let c_title = config.get_event_type_name(c_event_item.type)
         let c_text = ""
+        let c_data
         switch (c_event_item.type) {
             case config.event_type.play_ani: //0播放动画
-            c_title = '播放动画'
-            c_text = `${c_event_item.event_item_play_ani_data.binding_widget_id}`
+            c_data = c_event_item.event_item_play_ani_data
+            c_text = `id:${c_data.binding_widget_id} 选中的动画id:${c_data.ani_id}`
             break;
             case config.event_type.top_view: //1弹窗
-            c_title = '弹窗'
             c_text = `${c_event_item.event_item_top_view_data.binding_ui_id}`
             break;
             case config.event_type.top_view_hide: //23弹窗隐藏
-            c_title = '弹窗隐藏'
             c_text = `${c_event_item.event_item_top_view_hide_data.binding_ui_id}`
             break;
             case config.event_type.text_sound: //2出现文字及语音
-            c_title = '出现文字及语音'
             c_text = `${c_event_item.event_item_text_sound_data.binding_widget_id}`
             break;
             case config.event_type.change_one_item_status: //3改变指定道具资源
-            c_title = '改变指定道具资源'
             c_text = `${c_event_item.event_item_change_one_item_status_data.binding_widget_id}`
             break;
             case config.event_type.show_new_item://4出现新道具
-            c_title = '出现新道具'
             c_text = `${c_event_item.event_item_show_new_item_data.binding_widget_id}`
             break;
             case config.event_type.show_question_select://5出现问题选择
-            c_title = '出现问题选择'
             c_text = `${c_event_item.event_item_show_question_select_data.binding_widget_id}`
             break;
             case config.event_type.start_event://6开始事件
-            c_title = '开始事件'
             c_text = `${c_event_item.event_item_start_event_data.binding_event_id}`
             break;
             case config.event_type.collect_event://7收集事件 多组件完成触发
-            c_title = ''
-            c_text = `收集事件 多组件完成触发`
+            c_data = c_event_item.event_item_collect_event_data
+            for(let index = 0; index<c_data.event_id_list.length; index++) {
+                const element = c_data.event_id_list[index]
+                c_text += `${element} `
+            }
             break;
             case config.event_type.active_event://8激活
-            c_title = '激活'
-            c_text = `${c_event_item.event_item_active_event_data.binding_widget_id}`
+            c_data = c_event_item.event_item_active_event_data
+            c_text = `${c_data.binding_widget_id}`
+            for(let index = 0; index <c_data.binding_widget_list.length; index++) {
+                const element = c_data.binding_widget_list[index]
+                let str = `\n${element.binding_widget_id}`
+                c_text += str
+            }
             break;
             case config.event_type.stop_active_event://9停用交互
-            c_title = '停用交互'
-            c_text = `${c_event_item.event_item_stop_active_event_data.binding_widget_id}`
+            c_data = c_event_item.event_item_stop_active_event_data
+            c_text = `${c_data.binding_widget_id}`
+            for(let index = 0; index <c_data.binding_widget_list.length; index++) {
+                const element = c_data.binding_widget_list[index]
+                let str = `\n${element.binding_widget_id}`
+                c_text += str
+            }
             break;
             case config.event_type.countdown_over://10倒计时结束
-            c_title = '倒计时结束'
             c_text = `${c_event_item.event_item_countdown_over_data.binding_widget_id}`
             break;
             case config.event_type.be_event: //11被动触发事件
-            c_title = '被动触发事件'
             c_text = `${c_event_item.event_item_be_event_data.binding_widget_id}`
             break;
             case config.event_type.hide://12触发让控件隐藏
-            c_title = '触发让控件隐藏'
-            c_text = `${c_event_item.event_item_hide_data.binding_widget_id}`
+            c_data = c_event_item.event_item_hide_data
+            c_text = `${c_data.binding_widget_id}`
+            for(let index = 0; index <c_data.binding_widget_list.length; index++) {
+                const element = c_data.binding_widget_list[index]
+                let str = `\n${element.binding_widget_id}`
+                c_text += str
+            }
             break;
             case config.event_type.delay_exe_event://13延迟多久执行一个事件
-            c_title = '延迟多久执行一个事件'
             c_text = `${c_event_item.event_item_delay_exe_data.binding_event_id}`
             break;
             case config.event_type.fail_event://14失败
-            c_title = ''
-            c_text = `失败`
+            c_data = c_event_item.event_item_fail_event_data
+            let is_relife_str = c_data.is_relife ? '是' : '否'
+            let is_show_animation_str = c_data.is_show_animation ? '是' : '否'
+            c_text = `是否可以复活:${is_relife_str}  是否显示动画:${is_show_animation_str}`
             break;
             case config.event_type.play_sound://15播放一个音效
-            c_title = ''
-            c_text = `播放一个音效`
+            c_data =c_event_item.event_item_play_sound_data
+            let isLoop_str = c_data.isLoop ? '是' : '否'
+            c_text = `是否循环:${isLoop_str}  音量:${c_data.volume}`
             break;
             case config.event_type.show_scene_title://16显示场景的标签
-            c_title = '标签内容'
             c_text = `${c_event_item.event_item_show_scene_title_data.title}`
             break;
             case config.event_type.scene_ani://17场景动画
-            c_title = '场景动画'
             c_text = `${c_event_item.event_item_scene_ani.ani_id}`
             break;
             case config.event_type.delete_drag_other_data://18删除其他拖拽目标的属性
-            c_title = '删除其他拖拽目标的属性'
-            c_text = `${c_event_item.event_item_delete_drag_other_data.widget_id}`
+            c_data = c_event_item.event_item_delete_drag_other_data
+            c_text = `${c_data.widget_id} 索引${c_data.delete_drag_other_index}`
+            for(let index = 0; index <c_data.widget_list.length; index++) {
+                const element = c_data.widget_list[index]
+                let str = `\n${element.widget_id} 索引${element.delete_drag_other_index}`
+                c_text += str
+            }
             break;
             case config.event_type.stop_play_loop_sound://19停止一个音效
-            c_title = '停止一个音效'
             c_text = `${c_event_item.event_item_stop_play_loop_sound_data.res}`
             break;
             case config.event_type.switch_scene_event://20切换场景
-            c_title = '多场景-切换场景按钮'
             let direction = c_event_item.event_item_switch_scene_event_data.direction
             let direction_str = '按钮-无'
             if(direction == config.switch_scene_page_direction.up) {
@@ -157,15 +170,12 @@ export class search_node extends Component {
             c_text = `方向:${direction_str} 页数:${c_event_item.event_item_switch_scene_event_data.binding_page_index+1} 仅执行一次:${executeOnlyOnce_string}`
             break;
             case config.event_type.more_scene_is_show_arrow_event://21多场景-是否显示箭头
-            c_title = '多场景-是否显示箭头'
             c_text = c_event_item.event_item_more_scene_is_show_arrow_event_data.is_show ? '是' : '否'
             break;
             case config.event_type.more_scene_jump_assigned_page_event://22多场景-跳转指定页数事件
-            c_title = '多场景-跳转指定页数事件'
             c_text = `页数:${c_event_item.event_item_more_scene_jump_assigned_page_event_data.page_number}`
             break;
             case config.event_type.event_group://100事件组
-            c_title = '事件组'
             let line_feed_str = '\n'
             let event_list = c_event_item.event_item_event_group_data.list
             if(event_list.length>0) {