فهرست منبع

nextLv_gameOver

0224995 3 هفته پیش
والد
کامیت
039f3b75d5

+ 7 - 5
assets/Scene/StartScene.scene

@@ -2426,7 +2426,7 @@
     "__prefab": null,
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 210,
+      "width": 0,
       "height": 15
     },
     "_anchorPoint": {
@@ -2557,7 +2557,7 @@
     "_prefab": null,
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 63.34228515625,
+      "x": 50.65228515625,
       "y": 0,
       "z": 0
     },
@@ -2601,7 +2601,7 @@
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
-      "x": 0.5,
+      "x": 0,
       "y": 0.5
     },
     "_id": "25k9HEfQdOJZB/SyG69WMb"
@@ -3060,7 +3060,7 @@
     },
     "_mode": 0,
     "_totalLength": 300,
-    "_progress": 0.7,
+    "_progress": 0,
     "_reverse": false,
     "_id": "59Bip/gnFJZZFeMKxk0y99"
   },
@@ -13876,7 +13876,9 @@
     "_enabled": true,
     "__prefab": null,
     "_alignFlags": 45,
-    "_target": null,
+    "_target": {
+      "__id__": 2
+    },
     "_left": 0,
     "_right": 0,
     "_top": 0,

+ 0 - 1
assets/Script/Frames/ResourcesMgr.ts

@@ -26,7 +26,6 @@ class ResourcesMgr{
        //遍历所有资源 分门别类存储到对应的容器中
        for(const asset of assets){
           this.addRes(asset, asset.name);
-          //console.log(asset)
        }
     }
 

+ 32 - 16
assets/Script/Game/MyApp.ts

@@ -1,31 +1,47 @@
-import { _decorator, Component } from 'cc';
+import { _decorator, Component, director, EventGamepad, Node } from 'cc';
 import { resMgr } from '../Frames/ResourcesMgr';
 import { dataMgr } from '../Frames/DataManager';
 import { LoadingUI } from './UI/LoadingUI';
+import { localDt } from '../Frames/LocalDt';
+import { GameInfo } from '../GameInfo';
+import { UIMgr } from '../Frames/UIManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('MyApp')
 export class MyApp extends Component {
+    private static hasOpenedStartUI = false;
+    loadingUI: Node | null = null;
+    protected onLoad(): void {
+        this.loadingUI = this.node.getChildByName("LoadingUI");
+    }
     protected async start(){
-        // await UIMgr.openUI("LoadingUI",UIType.PAGE);
-        // const loadingUI = UIMgr.getUI(LoadingUI);
-        const loadingUI = this.node.getChildByName("LoadingUI").getComponent(LoadingUI)
+        if(MyApp.hasOpenedStartUI) return;
+        const loadingUI = this.loadingUI?.getComponent(LoadingUI)
+        if(!this.loadingUI.active){
+            this.loadingUI.active = true;
+        }
         await dataMgr.loadDataDir("Data");
         await resMgr.loadAllRes("Res", (finish, total)=>{
-            if(loadingUI){
-                loadingUI.updateProgress(finish / total);
-                loadingUI.updateWhichRes(1);
-            }
+                loadingUI?.updateProgress(finish / total);
+                loadingUI?.updateWhichRes(1);
         });
         await resMgr.loadAllRes("UI", (finish, total)=>{
-            if(loadingUI){
-                loadingUI.updateProgress(finish / total);
-                loadingUI.updateWhichRes(2);
-            }
+                loadingUI?.updateProgress(finish / total);
+                loadingUI?.updateWhichRes(2);
         });
-        
-        this.node.getChildByName("LoadingUI").active = false;
-        // UIMgr.closeUI("LoadingUI");
-        // UIMgr.openUI("Start",UIType.PAGE);
+        if(!localDt.getGold()){
+            localDt.saveGold(8888);
+        }
+        if(!localDt.getDiamond()){
+            localDt.saveDiamond(200);
+        }
+        if(!localDt.getLvDt()){
+            localDt.saveLvDt(1);
+        }
+        this.loadingUI.active = false;
+        if(!MyApp.hasOpenedStartUI){
+            UIMgr.openUI("Start");
+            MyApp.hasOpenedStartUI = true;
+        }
     }
 }

+ 2 - 1
assets/Script/Game/MyApp/BattleSceneSelect.ts

@@ -3,6 +3,7 @@ import { UIBase } from '../GameFrameWork/UIBase';
 import { UIMgr } from '../../Frames/UIManager';
 import { resMgr } from '../../Frames/ResourcesMgr';
 import { GameInfo } from '../../GameInfo';
+import { localDt } from '../../Frames/LocalDt';
 const { ccclass, property } = _decorator;
 
 @ccclass('BattleSceneSelect')
@@ -12,7 +13,7 @@ export class BattleSceneSelect extends UIBase {
         this._curLv(GameInfo.Instance.getCurlv());
         this._winNumber(GameInfo.Instance.getWin());
         this._failNumber(GameInfo.Instance.getFail());
-        this._gold(GameInfo.Instance.getGold());
+        this._gold(localDt.getGold());
         this._diamond(GameInfo.Instance.getDiamond());
         this._grade(GameInfo.Instance.getGrade());
     }

+ 8 - 0
assets/Script/Game/MyApp/GameScene/Bottom.ts

@@ -27,6 +27,7 @@ export class Bottom extends ModulerBase {
     }
 
     onStart() {
+        this.initData();
         this.getLabel("_lvNumber").string = String(GameInfo.Instance.getCurlv());
         this.getLabel("_oreGrade").string = `等级:${GameInfo.Instance.getOreGrade()}`;
         this.getLabel("_ownNumber").string = String(GameInfo.Instance.getOwnDiamondNum());
@@ -40,6 +41,13 @@ export class Bottom extends ModulerBase {
         messageMgr.addEvent("addOreCount", this.onEnemyDeath, this)
     }
 
+    initData(){
+        this.getLabel("_lvNumber").string = String(GameInfo.Instance.getCurlv());
+        this.getLabel("_ownNumber").string = String(GameInfo.Instance.getOwnDiamondNum());
+        this.getLabel("_ownNumber").string = String(GameInfo.Instance.getOwnDiamondNum());
+        this.oreCount = 100;
+    }
+
     protected update(dt: number): void {
         //累加时间
         this._elapsedTime += dt;

+ 3 - 2
assets/Script/Game/MyApp/GameScene/Enemy.ts

@@ -15,11 +15,12 @@ export class Enemy extends Role {
     private _isDie: boolean = false;
     private _orePos: Vec3 = new Vec3(200, 100, 0);
     protected onLoad(): void {
-        this._lifeBar = this.node.getComponent(LifeBar);
-        this._isDie = false;
+        
     }
     init(name: string, pos: Vec3, data: RoleData[], dir?: number) {
         super.init(name, pos, data, dir);
+        this._lifeBar = this.node.getComponent(LifeBar);
+        this._isDie = false;
         this._initLifeBar();
     }
 

+ 2 - 1
assets/Script/Game/MyApp/GameScene/EnemyMgr.ts

@@ -30,10 +30,11 @@ export class EnemyMgr extends ModulerBase {
         this._bg = this.node.parent.getChildByName("Bg");
         this._lvDts = dataMgr.getAllDataByName("LevelDt");
         this._hight = GameMgr.Instance.getModuler(TouchGame)._hight;
-        this._roleDatas = dataMgr.getAllDataByName("RoleCardData");
+        
         this._enemyTower = this.node.parent.getChildByName("EnemyTower");
     }
     init() {
+        this._roleDatas = dataMgr.getAllDataByName("RoleCardData");
         //第几关的数据
         this._lvDt = this._lvDts[GameInfo.Instance.getCurlv() - 1];
         this._createEnemy();

+ 5 - 1
assets/Script/Game/MyApp/GameScene/EnemyTower.ts

@@ -1,4 +1,4 @@
-import { _decorator, find, Label, PhysicsGroup } from 'cc';
+import { _decorator, director, find, Label, PhysicsGroup } from 'cc';
 import { LifeBar } from './LifeBar';
 import { Role } from '../Role';
 import { Enemy } from './Enemy';
@@ -19,6 +19,9 @@ export class EnemyTower extends Role {
         this._strMyHp = this.node.getChildByPath("ProgressBar/Label").getComponent(Label);
     }
     start() {
+        this.initData();
+    }
+    initData(){
         this.hp = this.enemyTotalHp;
         this._initLifeBar();
     }
@@ -42,6 +45,7 @@ export class EnemyTower extends Role {
         const myTower = find("Canvas/GameRoot/MyTower").getComponent(MyTower);
         this._lifePercent(myTower.getCurHp(), myTower.getTotalHp())
         GameMgr.Instance.getModuler(GameOver).show();
+        director.pause();
     }
 
     private _lifePercent(curHp: number, totalHp: number) {

+ 45 - 19
assets/Script/Game/MyApp/GameScene/GameOver.ts

@@ -1,9 +1,13 @@
-import { _decorator, Director, director, EventKeyboard, find, Label, NodeEventType, } from 'cc';
+import { _decorator,  director, Label, log, PhysicsSystem, } from 'cc';
 import { ModulerBase } from '../../GameFrameWork/ModulerBase';
 import { resMgr } from '../../../Frames/ResourcesMgr';
 import { GameInfo } from '../../../GameInfo';
-import { messageMgr } from '../../../Frames/MessageMgr';
 import { localDt } from '../../../Frames/LocalDt';
+import { GameMgr } from '../../GameFrameWork/GameMgr';
+import { EnemyMgr } from './EnemyMgr';
+import { MyTower } from './MyTower';
+import { Bottom } from './Bottom';
+import { EnemyTower } from './EnemyTower';
 const { ccclass, property } = _decorator;
 
 @ccclass('GameOver')
@@ -59,19 +63,19 @@ export class GameOver extends ModulerBase {
 
         this.getLabel("_lifePercent").string = `${GameInfo.Instance.getLifePecent()}%`;
         this.getLabel("_killCount").string = `${GameInfo.Instance.getKillCount()}`;
-        
+
         const kill: number = this.calculateReward(GameInfo.Instance.getKillCount(), this.KillRewardConfig);
         const life: number = this.calculateReward(GameInfo.Instance.getLifePecent(), this.LifeRewardConfig);
         const stageClear: number = this.calculateReward(GameInfo.Instance.getCurlv(), this.newresultRewardConfig);
-        
+
         this.xp = GameInfo.Instance.getCurlv() * 30;
         this.totalGold = kill + life + stageClear;
-        
+
         const lifeDia: number = Math.floor(life * 0.08);
         const stageClearDia: number = Math.floor(stageClear * 0.07);
-        
+
         this.totalDia = lifeDia + stageClearDia;
-        
+
         this.getLabel("_kill").string = `${kill}`;
         this.getLabel("_life").string = `${life}`;
         this.getLabel("_stageClear").string = `${stageClear}`;
@@ -83,6 +87,8 @@ export class GameOver extends ModulerBase {
     }
 
     private _onBtnBack() {
+        director.resume()
+        director.purgeDirector();
         this.addReward();
         this.clearDt();
         this.hide(false);
@@ -90,13 +96,14 @@ export class GameOver extends ModulerBase {
     }
 
     private _onBtnRight() {
-        if(GameInfo.Instance.getOverWin()){
-            this.addReward();
+        director.resume();
+        if (GameInfo.Instance.getOverWin()) {
+            //初始化场景
+            this._initGameScene();
             console.log("下一关")
         } else {
-            console.log("重新开始")
+            //director.loadScene("GameScene")
         }
-        this.clearDt();
     }
 
     //计算奖励
@@ -111,24 +118,43 @@ export class GameOver extends ModulerBase {
     private clearDt() {
         GameInfo.Instance.setKillCount(0);
         GameInfo.Instance.setLifePecent(0);
-        GameInfo.Instance.setOverWin(false)
+        GameInfo.Instance.setOverWin(false);
+        GameInfo.Instance.setIsGameOver(false);
     }
 
-    private addReward(){
+    private addReward() {
         const map: Map<string, number> = new Map();
-        map.set("GameOverRewardGold",this.totalGold + GameInfo.Instance.getGold());
+        map.set("GameOverRewardGold", this.totalGold + localDt.getGold());
         map.set("GameOverRewardDia", this.totalDia + GameInfo.Instance.getDiamond());
         map.set("Xp", this.xp + GameInfo.Instance.getCurGradeExp());
-        
-        if(GameInfo.Instance.getOverWin()){
+
+        if (GameInfo.Instance.getOverWin()) {
             GameInfo.Instance.setCurLv(GameInfo.Instance.getCurlv() + 1);
             map.set("CurLv", GameInfo.Instance.getCurlv());
         }
         GameInfo.Instance.setGameOverReward(map);
-        GameInfo.Instance.setGold(this.totalGold + GameInfo.Instance.getGold());
+        //GameInfo.Instance.setGold(this.totalGold + GameInfo.Instance.getGold());
+        localDt.saveGold(this.totalGold + localDt.getGold());
+
         GameInfo.Instance.setDiamond(this.totalDia + GameInfo.Instance.getDiamond());
-        localDt.saveGold(GameInfo.Instance.getGold());
-        localDt.saveDiamond(GameInfo.Instance.getDiamond());
+        localDt.saveDiamond(GameInfo.Instance.getDiamond())
+    }
+
+    //初始化场景 重置数据
+    private _initGameScene() {
+        this.addReward();
+        this.clearDt();
+        GameMgr.Instance.getModuler(EnemyMgr).node.removeAllChildren();
+        this.node.parent.getChildByPath("Road/Roles").removeAllChildren();
+        this.node.parent.getChildByPath("BulletLayer").removeAllChildren();
+
+        GameMgr.Instance.getModuler(EnemyMgr).init();
+        this.node.parent.getComponentInChildren(EnemyTower).initData();
+        this.node.parent.getComponentInChildren(MyTower).initData();
+        GameMgr.Instance.getModuler(Bottom).initData();
+
+        //隐藏
+        this.hide(false);
     }
 }
 

+ 5 - 1
assets/Script/Game/MyApp/GameScene/MyTower.ts

@@ -1,4 +1,4 @@
-import { _decorator, Label, PhysicsGroup} from 'cc';
+import { _decorator, director, Label, PhysicsGroup} from 'cc';
 import { Role } from '../Role';
 import { LifeBar } from './LifeBar';
 import { Enemy } from './Enemy';
@@ -16,6 +16,9 @@ export class MyTower extends Role {
         this._strMyHp = this.node.getChildByPath("ProgressBar/Label").getComponent(Label);
     }
     start() {
+        this.initData();
+    }
+    initData(){
         this.hp = GameInfo.Instance.getMyTowerHp();
         this._initLifeBar();
     }
@@ -46,6 +49,7 @@ export class MyTower extends Role {
         GameInfo.Instance.setOverWin(false);
         GameInfo.Instance.setLifePecent(0);
         GameMgr.Instance.getModuler(GameOver).show();
+        director.pause();
     }
 
     //必须实现抽象方法

+ 3 - 1
assets/Script/Game/UI/BattleSceneTop.ts

@@ -5,6 +5,7 @@ import { ModulerBase } from '../GameFrameWork/ModulerBase';
 import { GameMgr } from '../GameFrameWork/GameMgr';
 import { SelectTroops } from './SelectTroops';
 import { messageMgr } from '../../Frames/MessageMgr';
+import { localDt } from '../../Frames/LocalDt';
 const { ccclass, property } = _decorator;
 
 @ccclass('BattleSceneTop')
@@ -12,7 +13,8 @@ export class BattleSceneTop extends ModulerBase {
 
     protected onStart() {
         this.onBtnClick("_btnReturn", this._btnReturn);
-        this._gold(GameInfo.Instance.getGold());
+        //this._gold(GameInfo.Instance.getGold());
+        this._gold(localDt.getGold());
         this._diamond(GameInfo.Instance.getDiamond());
         this.battleMode("战斗模式");
         messageMgr.addEvent("reduceGold", this._gold, this);

+ 7 - 4
assets/Script/Game/UI/PopupUI.ts

@@ -8,6 +8,7 @@ import { Tip } from './Tip';
 import { messageMgr } from '../../Frames/MessageMgr';
 import { GameMgr } from '../GameFrameWork/GameMgr';
 import { BattleSceneTop } from './BattleSceneTop';
+import { localDt } from '../../Frames/LocalDt';
 const { ccclass, property } = _decorator;
 
 @ccclass('PopupUI')
@@ -77,7 +78,8 @@ export class PopupUI extends UIBase {
         // }
         const resourceMap = {
             "Gold": {
-                getAmount: GameInfo.Instance.getGold(),
+                //getAmount: GameInfo.Instance.getGold(),
+                getAmount: localDt.getGold(),
                 message: "金币不足!",
             },
             "Diamond": {
@@ -90,8 +92,8 @@ export class PopupUI extends UIBase {
         //消耗
         const consume: number = Number(this._consume);
         //总共
-        const totalGold: number = GameInfo.Instance.getGold();
-        
+        //const totalGold: number = GameInfo.Instance.getGold();
+        const totalGold: number = localDt.getGold();
         if (resource && Number(this._consume) > resource.getAmount) {
             const tip: Node = instantiate(resMgr.getPrefab("Tip"));
             tip.getComponent(Tip).setContent(resource.message);
@@ -100,7 +102,8 @@ export class PopupUI extends UIBase {
         }
         GameMgr.Instance.getModuler(BattleSceneTop)._gold((totalGold - consume));
         //messageMgr.dispatch("reduceGold", (totalGold - consume));
-        GameInfo.Instance.setGold((totalGold - consume));
+        //GameInfo.Instance.setGold((totalGold - consume));
+        localDt.saveGold(Number(totalGold - consume));
         (PopupUIDataConfig.Instance.getFunction())();
         UIMgr.closeUI("PopupUI", true);
         PopupUIDataConfig.Instance.clearDt();

+ 8 - 2
assets/Script/Game/UI/Start.ts

@@ -6,8 +6,9 @@ const { ccclass, property } = _decorator;
 @ccclass('Start')
 export class Start extends UIBase {
     protected onStart() {
-        this.onBtnClick("_btnStart", this._btnStart);
-        this.onBtnClick("_btnMusic", this._btnMusic);
+        this.onBtnClick("_btnStart", this._btnStart, this);
+        this.onBtnClick("_btnMusic", this._btnMusic, this);
+        this.onBtnClick("_clearData", this._btnClearDt, this)
     }
 
     private _btnStart() {
@@ -17,6 +18,11 @@ export class Start extends UIBase {
     private _btnMusic() {
 
     }
+
+    //清除本地数据
+    private _btnClearDt(){
+        localStorage.clear();
+    }
 }
 
 

+ 6 - 4
assets/Script/GameInfo.ts

@@ -1,3 +1,5 @@
+import { localDt } from "./Frames/LocalDt";
+
 export class GameInfo {
 
     private static _instance: GameInfo = null;
@@ -58,8 +60,8 @@ export class GameInfo {
     }
 
     //关卡
-    getCurlv(): number { return this._curlv };
-    setCurLv(lv: number) { this._curlv = lv };
+    getCurlv(): number { return localDt.getLvDt() };
+    setCurLv(lv: number) { localDt.saveLvDt(lv) };
 
     //获胜场数
     getWin(): number { return this._winNumber };
@@ -74,8 +76,8 @@ export class GameInfo {
     setGold(gold: number) { this._goldAmount = gold };
 
     //钻石数量
-    getDiamond(): number { return this._diamondAmout };
-    setDiamond(diamond: number) { this._diamondAmout = diamond };
+    getDiamond(): number { return localDt.getDiamond() };
+    setDiamond(diamond: number) { localDt.saveDiamond(diamond) };
 
     //玩家账号等级
     getGrade(): number { return this._grade };

+ 449 - 12
assets/resources/UI/Start.prefab

@@ -23,25 +23,28 @@
       },
       {
         "__id__": 12
+      },
+      {
+        "__id__": 22
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 22
+        "__id__": 40
       },
       {
-        "__id__": 24
+        "__id__": 42
       },
       {
-        "__id__": 26
+        "__id__": 44
       },
       {
-        "__id__": 28
+        "__id__": 46
       }
     ],
     "_prefab": {
-      "__id__": 30
+      "__id__": 48
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -102,7 +105,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 390,
-      "y": 300,
+      "y": 300.08492569002124,
       "z": 0
     },
     "_lrot": {
@@ -344,7 +347,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -140,
+      "y": -140.08492569002124,
       "z": 0
     },
     "_lrot": {
@@ -553,22 +556,456 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "_clearData",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 23
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 31
+      },
+      {
+        "__id__": 33
+      },
+      {
+        "__id__": 35
+      },
+      {
+        "__id__": 37
+      }
+    ],
+    "_prefab": {
+      "__id__": 39
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 500.0585,
+      "y": 300.88492569002125,
+      "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": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "Label",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 22
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 24
+      },
+      {
+        "__id__": 26
+      },
+      {
+        "__id__": 28
+      }
+    ],
+    "_prefab": {
+      "__id__": 30
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "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": ""
+  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 1
+      "__id__": 23
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 25
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 80,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "91bx98BWFLx7OFs+y+Daf/"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 23
     },
     "_enabled": true,
     "__prefab": {
+      "__id__": 27
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_string": "清除数据",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 20,
+    "_fontSize": 20,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 0,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "95CZos6npFLZzerZdM6XMb"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
       "__id__": 23
     },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 29
+    },
+    "_alignFlags": 45,
+    "_target": null,
+    "_left": 20,
+    "_right": 20,
+    "_top": -6,
+    "_bottom": -6,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 42.255859375,
+    "_originalHeight": 50.4,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "1cY3pIpzFLNbDiJNilR9FC"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "22kqxw34tLeqAUBQjg0msb",
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 32
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 120,
+      "height": 38.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e5JcZ9mWRHObVC0lfEvNLp"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 34
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "1440ddfa-68c4-4328-bf37-600cd18f4812@afe4a",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 1,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "14ze42OFJNEJj2b57MCV4g"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 36
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 3,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 214,
+      "g": 214,
+      "b": 214,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": null,
+    "_hoverSprite": null,
+    "_pressedSprite": null,
+    "_disabledSprite": null,
+    "_duration": 0.1,
+    "_zoomScale": 1.2,
+    "_target": {
+      "__id__": 22
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "a6efazfSNDHLg12L+q4x44"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 22
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 38
+    },
+    "_alignFlags": 33,
+    "_target": null,
+    "_left": 0,
+    "_right": 79.94150000000002,
+    "_top": 40,
+    "_bottom": 0,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 0,
+    "_originalHeight": 0,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "98/92TGGVJBq+PofiSrReP"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "30mXoUqN5MUZk6iAqSPXpV",
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 41
+    },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1280,
-      "height": 720
+      "height": 720.1698513800425
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -591,7 +1028,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 25
+      "__id__": 43
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -636,7 +1073,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 27
+      "__id__": 45
     },
     "_alignFlags": 45,
     "_target": null,
@@ -672,7 +1109,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 29
+      "__id__": 47
     },
     "_id": ""
   },