xx 1 жил өмнө
parent
commit
4e0c74f139

+ 1 - 0
assets/data/data.ts

@@ -49,6 +49,7 @@ export class att_ani_data{ //动画属性
     public ani_id:number = 0; //动画id
     public ani_name:string = ""; //动画名字
     public isLoop:boolean = false;//是否循环
+    public isMove:boolean = true; //是否移動
     public binding_widget_id:number =0; //哪个控件
     public ani_frame_list:ani_frame[] = [];//动画帧
 }

+ 176 - 176
assets/edit_game.scene

@@ -113,8 +113,8 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 960,
-      "y": 540,
+      "x": 959.9999999999999,
+      "y": 960,
       "z": 0
     },
     "_lrot": {
@@ -203,8 +203,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1920,
-      "height": 1080
+      "width": 1919.9999999999998,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -341,7 +341,7 @@
     "_priority": 0,
     "_fov": 45,
     "_fovAxis": 0,
-    "_orthoHeight": 656.6722689075631,
+    "_orthoHeight": 959.9999999999999,
     "_near": 0,
     "_far": 1000,
     "_color": {
@@ -530,8 +530,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840,
-      "height": 1080
+      "width": 839.9999999999997,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7330,7 +7330,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -90,
+      "y": -509.9999999999999,
       "z": 0
     },
     "_lrot": {
@@ -7387,7 +7387,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 420,
+      "x": 419.99999999999983,
       "y": 0,
       "z": 0
     },
@@ -7787,7 +7787,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 800,
+      "width": 799.9999999999997,
       "height": 860
     },
     "_anchorPoint": {
@@ -7905,7 +7905,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": -285,
+      "x": -284.99999999999983,
       "y": -105,
       "z": 0
     },
@@ -8188,7 +8188,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 800,
+      "width": 799.9999999999997,
       "height": 210
     },
     "_anchorPoint": {
@@ -8272,7 +8272,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840,
+      "width": 839.9999999999997,
       "height": 900
     },
     "_anchorPoint": {
@@ -13552,8 +13552,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 840,
-      "height": 1080
+      "width": 839.9999999999997,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -15444,7 +15444,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 750.1330000000002,
+      "x": 750.133,
       "y": 0,
       "z": 0
     },
@@ -30733,7 +30733,10 @@
         "__id__": 905
       },
       {
-        "__id__": 915
+        "__id__": 912
+      },
+      {
+        "__id__": 922
       }
     ],
     "_active": false,
@@ -30755,7 +30758,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -1017.8,
+      "y": -1501.7000000000003,
       "z": 0
     },
     "_lrot": {
@@ -30803,7 +30806,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": -119.311,
-      "y": 121.1,
+      "y": 155,
       "z": 0
     },
     "_lrot": {
@@ -30916,7 +30919,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 52.19999999999999,
+      "y": 86.1,
       "z": 0
     },
     "_lrot": {
@@ -31874,7 +31877,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -37.80000000000001,
+      "y": -3.9000000000000057,
       "z": 0
     },
     "_lrot": {
@@ -32838,7 +32841,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 83.974,
-      "y": -117.80000000000001,
+      "y": -83.9,
       "z": 0
     },
     "_lrot": {
@@ -33610,7 +33613,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "btn_finish_logic",
+    "_name": "btn_add_other_drag_dis",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
@@ -33619,28 +33622,25 @@
     "_children": [
       {
         "__id__": 906
-      },
-      {
-        "__id__": 909
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
-        "__id__": 912
+        "__id__": 909
       },
       {
-        "__id__": 913
+        "__id__": 910
       },
       {
-        "__id__": 914
+        "__id__": 911
       }
     ],
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 83.974,
-      "y": -92.80000000000001,
+      "x": -10.554,
+      "y": -153.9,
       "z": 0
     },
     "_lrot": {
@@ -33668,7 +33668,7 @@
   },
   {
     "__type__": "cc.Node",
-    "_name": "Label",
+    "_name": "Label-001",
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
@@ -33685,115 +33685,6 @@
       }
     ],
     "_prefab": null,
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": -200.233,
-      "y": 0,
-      "z": 0
-    },
-    "_lrot": {
-      "__type__": "cc.Quat",
-      "x": 0,
-      "y": 0,
-      "z": 0,
-      "w": 1
-    },
-    "_lscale": {
-      "__type__": "cc.Vec3",
-      "x": 1,
-      "y": 1,
-      "z": 1
-    },
-    "_mobility": 0,
-    "_layer": 33554432,
-    "_euler": {
-      "__type__": "cc.Vec3",
-      "x": 0,
-      "y": 0,
-      "z": 0
-    },
-    "_id": "99miRwKl5CBKb7qZAJP6Gx"
-  },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 906
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 100,
-      "height": 50.4
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": "44ew0owQhEUrY60TSFCQ/u"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 906
-    },
-    "_enabled": true,
-    "__prefab": null,
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_string": "完成的条件",
-    "_horizontalAlign": 1,
-    "_verticalAlign": 1,
-    "_actualFontSize": 20,
-    "_fontSize": 20,
-    "_fontFamily": "Arial",
-    "_lineHeight": 40,
-    "_overflow": 0,
-    "_enableWrapText": false,
-    "_font": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_isItalic": false,
-    "_isBold": true,
-    "_isUnderline": false,
-    "_underlineHeight": 2,
-    "_cacheMode": 0,
-    "_id": "8fFtLDduJPjItzpDdLuZub"
-  },
-  {
-    "__type__": "cc.Node",
-    "_name": "Label-001",
-    "_objFlags": 512,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 905
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 910
-      },
-      {
-        "__id__": 911
-      }
-    ],
-    "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 6.459,
@@ -33829,13 +33720,13 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 909
+      "__id__": 906
     },
     "_enabled": true,
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 20,
+      "width": 120,
       "height": 50.4
     },
     "_anchorPoint": {
@@ -33851,7 +33742,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 909
+      "__id__": 906
     },
     "_enabled": true,
     "__prefab": null,
@@ -33865,7 +33756,7 @@
       "b": 0,
       "a": 255
     },
-    "_string": "",
+    "_string": "添加其他拖拽",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
     "_actualFontSize": 20,
@@ -34019,22 +33910,22 @@
     },
     "_children": [
       {
-        "__id__": 916
+        "__id__": 913
       },
       {
-        "__id__": 919
+        "__id__": 916
       }
     ],
     "_active": false,
     "_components": [
       {
-        "__id__": 922
+        "__id__": 919
       },
       {
-        "__id__": 923
+        "__id__": 920
       },
       {
-        "__id__": 924
+        "__id__": 921
       }
     ],
     "_prefab": null,
@@ -34073,16 +33964,16 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 915
+      "__id__": 912
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 917
+        "__id__": 914
       },
       {
-        "__id__": 918
+        "__id__": 915
       }
     ],
     "_prefab": null,
@@ -34121,7 +34012,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 916
+      "__id__": 913
     },
     "_enabled": true,
     "__prefab": null,
@@ -34143,7 +34034,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 916
+      "__id__": 913
     },
     "_enabled": true,
     "__prefab": null,
@@ -34182,16 +34073,16 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 915
+      "__id__": 912
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 920
+        "__id__": 917
       },
       {
-        "__id__": 921
+        "__id__": 918
       }
     ],
     "_prefab": null,
@@ -34230,7 +34121,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 919
+      "__id__": 916
     },
     "_enabled": true,
     "__prefab": null,
@@ -34252,7 +34143,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 919
+      "__id__": 916
     },
     "_enabled": true,
     "__prefab": null,
@@ -34291,7 +34182,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 915
+      "__id__": 912
     },
     "_enabled": true,
     "__prefab": null,
@@ -34313,7 +34204,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 915
+      "__id__": 912
     },
     "_enabled": true,
     "__prefab": null,
@@ -34352,7 +34243,7 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 915
+      "__id__": 912
     },
     "_enabled": true,
     "__prefab": null,
@@ -34406,10 +34297,112 @@
     "_duration": 0.1,
     "_zoomScale": 1.2,
     "_target": {
-      "__id__": 915
+      "__id__": 912
     },
     "_id": "c7HiaA2V1AJ57jDYVZCbLz"
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "content",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 829
+    },
+    "_children": [],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 923
+      },
+      {
+        "__id__": 924
+      }
+    ],
+    "_prefab": null,
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -188.9,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_mobility": 0,
+    "_layer": 33554432,
+    "_euler": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_id": "2d8wxOFHJKxqbHZ1QqGDfm"
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 922
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 0
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": "f5Q7plluZJGrtJOw3RZ6A1"
+  },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 922
+    },
+    "_enabled": true,
+    "__prefab": null,
+    "_resizeMode": 1,
+    "_layoutType": 2,
+    "_cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_startAxis": 0,
+    "_paddingLeft": 0,
+    "_paddingRight": 0,
+    "_paddingTop": 0,
+    "_paddingBottom": 0,
+    "_spacingX": 0,
+    "_spacingY": 0,
+    "_verticalDirection": 1,
+    "_horizontalDirection": 0,
+    "_constraint": 0,
+    "_constraintNum": 2,
+    "_affectedByScale": false,
+    "_isAlign": false,
+    "_id": "62CUASqV5Fj5MmMHYwRCmH"
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -34423,7 +34416,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 419.9999999999998,
-      "height": 300
+      "height": 367.8
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -34472,7 +34465,7 @@
     },
     "_enabled": true,
     "__prefab": null,
-    "_resizeMode": 0,
+    "_resizeMode": 1,
     "_layoutType": 2,
     "_cellSize": {
       "__type__": "cc.Size",
@@ -34522,9 +34515,16 @@
     "lab_is_err_back_pos": {
       "__id__": 889
     },
-    "btn_add_other_drag_dis": null,
-    "content": null,
-    "other_drag_item": null,
+    "btn_add_other_drag_dis": {
+      "__id__": 905
+    },
+    "content": {
+      "__id__": 922
+    },
+    "other_drag_item": {
+      "__uuid__": "b270a1fd-b483-4a4d-b07f-12d21fac0b4e",
+      "__expectedType__": "cc.Prefab"
+    },
     "_id": "e5FcorOItLFLRsAwR5uErv"
   },
   {
@@ -167802,8 +167802,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.9999999999998,
-      "height": 1030
+      "width": 419.99999999999943,
+      "height": 1869.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -168027,8 +168027,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 419.9999999999998,
-      "height": 1080
+      "width": 419.99999999999943,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -170642,8 +170642,8 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 1920,
-      "height": 1080
+      "width": 1919.9999999999998,
+      "height": 1919.9999999999998
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 671 - 184
assets/resources/prefab/add_animation.prefab


+ 9 - 0
assets/script/edit/animation/edit_animation.ts

@@ -22,6 +22,7 @@ export class edit_animation extends Component {
     @property(Node) opt_frame:Node = null;
     @property(Node) lab_run_status:Node = null;
     @property(Node) toggle_loop:Node = null;
+    @property(Node) toggle_move:Node = null;
     private m_data:att_ani_data = null;
     private play_status:boolean = false;
     public initView(){
@@ -33,6 +34,13 @@ export class edit_animation extends Component {
                 this.new_frame.getComponent(new_frame).show(up_frame);
             }
         })
+        if(this.m_data.isMove==undefined||this.m_data.isMove == null){
+            this.m_data.isMove = true;
+        }
+
+        this.toggle_move.on('toggle',()=>{
+            this.m_data.isMove = this.toggle_move.getComponent(Toggle).isChecked;
+        })
 
         this.toggle_loop.on('toggle',()=>{
             Tween.stopAll()
@@ -42,6 +50,7 @@ export class edit_animation extends Component {
             this.m_data.isLoop = this.toggle_loop.getComponent(Toggle).isChecked;
         })
         this.toggle_loop.getComponent(Toggle).isChecked =  this.m_data.isLoop
+        this.toggle_move.getComponent(Toggle).isChecked =  this.m_data.isMove
         this.btn_close.on(Node.EventType.TOUCH_END,()=>{
             if(!this.play_status){
                 this.node.active = false;

+ 6 - 1
assets/script/run/widget/widget_base.ts

@@ -160,6 +160,9 @@ export class widget_base extends Component {
             Tween.stopAllByTarget(this.bindTarget)
             this.bindTarget = null;
         }
+        if(this.mCurAnimation.isMove==undefined||this.mCurAnimation.isMove==null){
+            this.mCurAnimation.isMove = true;
+        }
         // Tween.stopAll()
         let getFrameData = (index)=>{
             let cur_frame:ani_frame =this.mCurRunAnimation[index];
@@ -209,7 +212,9 @@ export class widget_base extends Component {
                 self.icon.getComponent(Sprite).color = tar.color; 
                 self.icon.getComponent(UIOpacity).opacity = tar.opacity;
                 self.icon.getComponent(UITransform).setContentSize(tar.size)
-                self.node.position = tar.pos
+                if(self.mCurAnimation.isMove){
+                    self.node.position = tar.pos
+                }
                 self.node.angle = tar.rotation;
             }
         }).call(()=>{

+ 1 - 1
settings/v2/packages/project.json

@@ -3,7 +3,7 @@
   "general": {
     "designResolution": {
       "width": 1920,
-      "height": 1080,
+      "height": 1920,
       "fitWidth": true,
       "fitHeight": false
     }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно