future 1 年之前
父節點
當前提交
b9765c0bab
共有 2 個文件被更改,包括 69 次插入26 次删除
  1. 57 25
      assets/resources/ui/unLock_view.prefab
  2. 12 1
      assets/script/ui/unLock_view/unLock_view.ts

+ 57 - 25
assets/resources/ui/unLock_view.prefab

@@ -25,14 +25,11 @@
         "__id__": 10
       },
       {
-        "__id__": 54
+        "__id__": 56
       }
     ],
     "_active": true,
     "_components": [
-      {
-        "__id__": 60
-      },
       {
         "__id__": 62
       },
@@ -41,10 +38,13 @@
       },
       {
         "__id__": 66
+      },
+      {
+        "__id__": 68
       }
     ],
     "_prefab": {
-      "__id__": 68
+      "__id__": 70
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -143,7 +143,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -275,14 +275,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 49
+        "__id__": 51
       },
       {
-        "__id__": 51
+        "__id__": 53
       }
     ],
     "_prefab": {
-      "__id__": 53
+      "__id__": 55
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -747,10 +747,13 @@
       },
       {
         "__id__": 46
+      },
+      {
+        "__id__": 48
       }
     ],
     "_prefab": {
-      "__id__": 48
+      "__id__": 50
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1219,6 +1222,35 @@
     "__type__": "cc.CompPrefabInfo",
     "fileId": "85TjVp86BF96z9bk7d+7MY"
   },
+  {
+    "__type__": "cc.Animation",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 29
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 49
+    },
+    "playOnLoad": false,
+    "_clips": [
+      {
+        "__uuid__": "34c58111-d3c6-45de-98d5-511f8c6a3545",
+        "__expectedType__": "cc.AnimationClip"
+      }
+    ],
+    "_defaultClip": {
+      "__uuid__": "34c58111-d3c6-45de-98d5-511f8c6a3545",
+      "__expectedType__": "cc.AnimationClip"
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "2bxh11ZYhMg4kaDOrMYLac"
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -1242,7 +1274,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 50
+      "__id__": 52
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1270,7 +1302,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 52
+      "__id__": 54
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1330,14 +1362,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 55
+        "__id__": 57
       },
       {
-        "__id__": 57
+        "__id__": 59
       }
     ],
     "_prefab": {
-      "__id__": 59
+      "__id__": 61
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -1374,11 +1406,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 54
+      "__id__": 56
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 56
+      "__id__": 58
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -1402,11 +1434,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 54
+      "__id__": 56
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 58
+      "__id__": 60
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1464,12 +1496,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 61
+      "__id__": 63
     },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1920.0000000000002
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -1492,7 +1524,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 63
+      "__id__": 65
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -1534,7 +1566,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 65
+      "__id__": 67
     },
     "_alignFlags": 45,
     "_target": null,
@@ -1570,10 +1602,10 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 67
+      "__id__": 69
     },
     "btn_close": {
-      "__id__": 54
+      "__id__": 56
     },
     "btn_look_video": {
       "__id__": 29

+ 12 - 1
assets/script/ui/unLock_view/unLock_view.ts

@@ -1,4 +1,4 @@
-import { _decorator, Component, Label, Node } from 'cc';
+import { _decorator, Component, Label, Node, Animation } from 'cc';
 import { base_ui } from '../../fw/base_ui';
 const { ccclass, property } = _decorator;
 
@@ -9,6 +9,7 @@ export class unLock_view extends base_ui {
     @property(Node) lab_look_video:Node = null
     start() {
         this.onButtonListen(this.btn_close, ()=>{
+            this.stopBtnLookVideoAni()
             this.close()
         })
         let count = 0
@@ -16,6 +17,16 @@ export class unLock_view extends base_ui {
             count++
             this.lab_look_video.getComponent(Label).string = '看视频' + count + '/3'
         })
+
+        this.playBtnLookVideoAni()
+    }
+
+    private playBtnLookVideoAni() {
+        this.btn_look_video.getComponent(Animation).play()
+    }
+
+    private stopBtnLookVideoAni() {
+        this.btn_look_video.getComponent(Animation).stop()
     }
 }