future 1 年之前
父节点
当前提交
89f48e6358

文件差异内容过多而无法显示
+ 589 - 237
assets/resources/prefab/add_animation.prefab


+ 1 - 1
assets/script/config.ts

@@ -5,7 +5,7 @@ const { ccclass, property } = _decorator;
 export class config {
     static debug = true;
     static domain = "https://zcapi.xwrun.com";
-    static version = '调试 v2.0.3'
+    static version = '调试 v2.0.4'
     static is_MAC_edit = false; //目前临时处理:如果是Mac并且浏览器打开了检查时设置为true,正式打包需要设置为false
     static select_res_and_control_type = {
         RES_TYPE:0,

+ 16 - 4
assets/script/edit/animation/edit_animation.ts

@@ -25,8 +25,24 @@ export class edit_animation extends Component {
     @property(Node) lab_run_status:Node = null;
     @property(Node) toggle_loop:Node = null;
     @property(Node) toggle_move:Node = null;
+    @property(Node) btn_set_all_ani_frame_res:Node = null;
     private m_data:att_ani_data = null;
     private play_status:boolean = false;
+    protected start(): void {
+        this.initView()   
+        this.btn_set_all_ani_frame_res.on(Node.EventType.TOUCH_END, ()=>{
+            tools.show_dialog('设置?',()=>{
+                let att = Attributes.Singleton.get_cur_att_data();
+                for (let index = 0; index < this.m_data.ani_frame_list.length; index++) {
+                    const element = this.m_data.ani_frame_list[index];
+                    element.url_name = att.src_name
+                    element.url = att.src
+                }
+                tools.showToast("设置成功")
+            })
+        })
+    }
+    
     public initView(){
         this.new_frame.getComponent(new_frame).initView(this.onCreateFrame.bind(this),this.onUpdateFrame.bind(this))
         this.opt_frame.getComponent(opt_frame).initView(this.onClickDelete.bind(this),this.onClickEdit.bind(this))
@@ -161,10 +177,6 @@ export class edit_animation extends Component {
         this.lab_slider.getComponent(Label).string =  `显示缩放:${ this.slider_scale.progress.toFixed(3)}`
     }
 
-    protected start(): void {
-        this.initView()   
-    }
-
     public show(data:att_ani_data){
         this.node.active = true;
         this.m_data = data;

+ 16 - 7
assets/script/edit/animation/new_frame.ts

@@ -95,6 +95,9 @@ export class new_frame extends Component {
             }
 
             let res_sf = control.res_map.get(this.m_data.url_name)
+            if(res_sf==undefined||res_sf==null) {
+                return tools.showToast('资源sf是空的')
+            }
             this.m_data.size_width = res_sf.originalSize.width
             this.m_data.size_height = res_sf.originalSize.height
             this.size_width.getComponent(EditBox).string = this.m_data.size_width.toString()
@@ -104,19 +107,25 @@ export class new_frame extends Component {
         
         this.btn_select_res.on(Node.EventType.TOUCH_END,()=>{
             // console.log('选择资源')
+            let is_reset = false
+            if(this.m_data.url_name.length == 0||this.m_data.url_name =='空') {
+                is_reset = true
+            }
             tools.select_res_list((data:bag_item_data)=>{
                 this.m_data.url = data.url;
                 this.m_data.url_name = data.name;
 
                 let res_sf = control.res_map.get(this.m_data.url_name)
                 this.hide_spr.getComponent(Sprite).spriteFrame = res_sf
-                this.m_data.size_width = res_sf.originalSize.width
-                this.m_data.size_height = res_sf.originalSize.height
-                this.size_width.getComponent(EditBox).string = this.m_data.size_width.toString()
-                this.size_height.getComponent(EditBox).string = this.m_data.size_height.toString()
-                this.setupInitAnchorPointXY()
-                this.setupSprRatationAction()
-                this.setupSprContentSize()
+                if(is_reset) {
+                    this.m_data.size_width = res_sf.originalSize.width
+                    this.m_data.size_height = res_sf.originalSize.height
+                    this.size_width.getComponent(EditBox).string = this.m_data.size_width.toString()
+                    this.size_height.getComponent(EditBox).string = this.m_data.size_height.toString()
+                    this.setupInitAnchorPointXY()
+                    this.setupSprRatationAction()
+                    this.setupSprContentSize()
+                }
             })
         })
 

+ 6 - 4
assets/script/edit/attributes/attributes_count_down.ts

@@ -135,11 +135,13 @@ export class attributes_count_down extends Component {
         if(down_count_time.length>0) {
             this.m_data.time_count = parseInt(down_count_time);
         }
-        let font_size = this.font_size.getComponent(EditBox).string
-        if(font_size.length>0) {
-            this.m_data.font_info.font_size = parseInt(font_size)
+        if(this.m_data.font_info!=undefined) {
+            let font_size = this.font_size.getComponent(EditBox).string
+            if(font_size.length>0) {
+                this.m_data.font_info.font_size = parseInt(font_size)
+            }
         }
-        
+
         if(this.call_back!=null){
             this.call_back(this.m_data)
         }

+ 11 - 10
assets/script/run/TaskSchedule/taskServce.ts

@@ -180,17 +180,18 @@ export class taskServce {
                         taskServce.cur_only_collect_event.event_item_collect_event_data.event_id_list.push(element)
                     }
                     // console.log('唯一 收集事件:',taskServce.cur_only_collect_event.event_item_collect_event_data.event_id_list)
-                } else {
-                    taskServce.cur_collect_event = new event_item;
-                    taskServce.cur_collect_event.event_id = event.event_id;
-                    taskServce.cur_collect_event.type = event.type;
-                    taskServce.cur_collect_event.event_item_collect_event_data = new event_collect_event_item
-                    for (let index = 0; index < event_id_list.length; index++) {
-                        const element = event_id_list[index];
-                        taskServce.cur_collect_event.event_item_collect_event_data.event_id_list.push(element)
-                    }
-                    // console.log('普通 收集事件:',taskServce.cur_collect_event.event_item_collect_event_data.event_id_list)
+                    return
+                }
+
+                taskServce.cur_collect_event = new event_item;
+                taskServce.cur_collect_event.event_id = event.event_id;
+                taskServce.cur_collect_event.type = event.type;
+                taskServce.cur_collect_event.event_item_collect_event_data = new event_collect_event_item
+                for (let index = 0; index < event_id_list.length; index++) {
+                    const element = event_id_list[index];
+                    taskServce.cur_collect_event.event_item_collect_event_data.event_id_list.push(element)
                 }
+                // console.log('普通 收集事件:',taskServce.cur_collect_event.event_item_collect_event_data.event_id_list)
 
                 // 之前的
                 // console.log("collect_event--",taskServce.cur_collect_event)

部分文件因为文件数量过多而无法显示