Browse Source

添加rank

jack.du 1 year ago
parent
commit
1b60f2e113

+ 8 - 1
assets/Script/Main/MainHome.ts

@@ -17,6 +17,8 @@ export default class MainHome extends cc.Component {
 
     private storeBtn: cc.Node = null;
 
+    private hisBtn:cc.Node = null;
+
     start() {}
     protected onLoad(): void {}
 
@@ -52,6 +54,7 @@ export default class MainHome extends cc.Component {
         this.headNode = CCUtils.findChild(this.node, 'headLayer');
         this.bottomNode = CCUtils.findChild(this.node, 'bottomLayer');
         this.storeBtn = CCUtils.findChild(this.bottomNode, 'storeBtn');
+        this.hisBtn = CCUtils.findChild(this.bottomNode, 'rankBtn');
         var seq = cc.repeatForever(
             cc.sequence(
                 cc.scaleTo(1, 0.9), 
@@ -60,9 +63,13 @@ export default class MainHome extends cc.Component {
             )
         );
         this.storeBtn.runAction(seq);
+        this.hisBtn.on('click',this.openHistUI,this)
     }
 
-
+    private openHistUI():void{
+        console.log("=====openHistUI====")
+        PrefabManager.open(UIID.UIRankPrefab, this.node);
+    }
 
     private setZindex(): void {
         this.headNode.zIndex = 1;

+ 38 - 0
assets/Script/Main/UIRank.ts

@@ -0,0 +1,38 @@
+// Learn TypeScript:
+//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
+// Learn Attribute:
+//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
+// Learn life-cycle callbacks:
+//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
+
+import PrefabManager from "../Manager/core/PrefabManager";
+import {UIID} from "../Manager/core/UIID";
+
+const {ccclass, property} = cc._decorator;
+
+@ccclass
+export default class UIRank extends cc.Component {
+
+    @property(cc.Sprite)
+    closeBtn: cc.Sprite = null;
+
+    
+    
+    // LIFE-CYCLE CALLBACKS:
+
+    // onLoad () {}
+
+    start () {
+
+        this.closeBtn.node.on('click',this.closeEvent,this)
+    }
+    
+    private closeEvent():void{
+        console.log("=====closeEvent====")
+        // this.node.destroy()
+
+        PrefabManager.close(UIID.UIRankPrefab);
+    }
+
+    // update (dt) {}
+}

+ 10 - 0
assets/Script/Main/UIRank.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "1118e5bc-a2d5-4c1b-af87-9a20cfd07a9c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 0
assets/Script/Manager/core/UIID.ts

@@ -8,4 +8,5 @@ export const UIID = {
     GameMainPrefab: 'Prefab/GameMain/GameMainPrefab',
     // public Setting: string = 'Prefab/Setting.prefab';
     // 添加更多UI的信息
+    UIRankPrefab: 'Prefab/Main/UIPopUps/UIRank',
 };

+ 2 - 2
assets/Texture/Common/logo-removebg.png.meta

@@ -8,8 +8,8 @@
   "premultiplyAlpha": true,
   "genMipmaps": false,
   "packable": true,
-  "width": 324,
-  "height": 324,
+  "width": 647,
+  "height": 647,
   "platformSettings": {},
   "subMetas": {
     "logo-removebg": {

+ 0 - 13
assets/Texture/UI/Home.meta

@@ -1,13 +0,0 @@
-{
-  "ver": "1.1.3",
-  "uuid": "c64e1682-09e7-4efb-bbf8-395735cabebb",
-  "importer": "folder",
-  "isBundle": false,
-  "bundleName": "",
-  "priority": 1,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

+ 0 - 13
assets/Texture/UI/Rank.meta

@@ -1,13 +0,0 @@
-{
-  "ver": "1.1.3",
-  "uuid": "c0141513-bfb3-49ea-b4a2-3bdc3e35279d",
-  "importer": "folder",
-  "isBundle": false,
-  "bundleName": "",
-  "priority": 1,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

+ 0 - 13
assets/Texture/UI/Store.meta

@@ -1,13 +0,0 @@
-{
-  "ver": "1.1.3",
-  "uuid": "34cf5e20-612e-4578-a5b8-4e1fde14f839",
-  "importer": "folder",
-  "isBundle": false,
-  "bundleName": "",
-  "priority": 1,
-  "compressionType": {},
-  "optimizeHotUpdate": {},
-  "inlineSpriteFrames": {},
-  "isRemoteBundle": {},
-  "subMetas": {}
-}

File diff suppressed because it is too large
+ 2791 - 31
assets/resources/Prefab/Main/UIPopUps/UIRank.prefab


BIN
assets/resources/loading/zp_x.png


+ 38 - 0
assets/resources/loading/zp_x.png.meta

@@ -0,0 +1,38 @@
+{
+  "ver": "2.3.7",
+  "uuid": "5afcd4bd-1ede-4097-9c0a-759e67cb39ce",
+  "importer": "texture",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "width": 70,
+  "height": 70,
+  "platformSettings": {},
+  "subMetas": {
+    "zp_x": {
+      "ver": "1.0.6",
+      "uuid": "8966aaae-6ef6-4c19-9d2f-bbdb56302f84",
+      "importer": "sprite-frame",
+      "rawTextureUuid": "5afcd4bd-1ede-4097-9c0a-759e67cb39ce",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 70,
+      "height": 70,
+      "rawWidth": 70,
+      "rawHeight": 70,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/sound/gameSong/0.mp3


+ 1 - 1
assets/resources/sound/gameSong/0.mp3.meta

@@ -3,6 +3,6 @@
   "uuid": "067b1b1b-d6c9-4680-9c67-6608c5534557",
   "importer": "audio-clip",
   "downloadMode": 0,
-  "duration": 57.322,
+  "duration": 57.39102,
   "subMetas": {}
 }

BIN
assets/resources/sound/gameSong/1.mp3


+ 1 - 1
assets/resources/sound/gameSong/1.mp3.meta

@@ -3,6 +3,6 @@
   "uuid": "d5436f69-103e-45b7-95c8-a7c0d42548b6",
   "importer": "audio-clip",
   "downloadMode": 0,
-  "duration": 114.719833,
+  "duration": 114.912653,
   "subMetas": {}
 }

BIN
assets/resources/sound/gameSong/2.mp3


+ 1 - 1
assets/resources/sound/gameSong/2.mp3.meta

@@ -3,6 +3,6 @@
   "uuid": "8aeac2b4-403b-4654-a747-f5a775147bf1",
   "importer": "audio-clip",
   "downloadMode": 0,
-  "duration": 84.114286,
+  "duration": 81.005688,
   "subMetas": {}
 }