Forráskód Böngészése

添加Dapp 版本

slambb 4 éve
szülő
commit
faa62e9864
38 módosított fájl, 1437 hozzáadás és 482 törlés
  1. 1 1
      assets/Scene/Login.fire
  2. 262 326
      assets/Scene/MyCityScene - 004.fire
  3. 1 1
      assets/Script/Login/Login.js
  4. 3 1
      assets/Script/Network/GameNet.ts
  5. 28 7
      assets/Script/Network/dapp.js
  6. 0 0
      assets/Script/Network/dapp.js.meta
  7. 72 0
      assets/Script/Network/gameToast.ts
  8. 9 0
      assets/Script/Network/gameToast.ts.meta
  9. 22 0
      assets/Script/Network/netUtils.ts
  10. 226 0
      assets/Script/adpp/ManageDapp.js
  11. 9 0
      assets/Script/adpp/ManageDapp.js.meta
  12. 0 0
      assets/Script/adpp/dapp-plugin.min.js
  13. 9 0
      assets/Script/adpp/dapp-plugin.min.js.meta
  14. 101 29
      assets/Script/adpp/inviteInfo.js
  15. 51 0
      assets/Script/adpp/villageAndMayor.js
  16. 9 0
      assets/Script/adpp/villageAndMayor.js.meta
  17. 44 97
      assets/Script/public/GameData.js
  18. 1 1
      assets/Script/public/ManageUI.js
  19. 7 0
      assets/UI/DApp.meta
  20. 7 0
      assets/UI/DApp/avatar.meta
  21. BIN
      assets/UI/DApp/avatar/farmer.png
  22. 10 10
      assets/UI/DApp/avatar/farmer.png.meta
  23. BIN
      assets/UI/DApp/avatar/mayor.png
  24. 6 6
      assets/UI/DApp/avatar/mayor.png.meta
  25. BIN
      assets/UI/DApp/avatar/village.png
  26. 34 0
      assets/UI/DApp/avatar/village.png.meta
  27. BIN
      assets/UI/NOther/EveryDaySign/CNT.png
  28. BIN
      assets/UI/NOther/EveryDaySign/CNTIcon.png
  29. 34 0
      assets/UI/NOther/EveryDaySign/CNTIcon.png.meta
  30. BIN
      assets/UI/NOther/EveryDaySign/SNB.png
  31. BIN
      assets/UI/NOther/EveryDaySign/SNBIcon.png
  32. 34 0
      assets/UI/NOther/EveryDaySign/SNBIcon.png.meta
  33. BIN
      assets/resources/login/shennongStartBgNew.png
  34. 34 0
      assets/resources/login/shennongStartBgNew.png.meta
  35. 409 0
      assets/resources/prefab/gameToast.prefab
  36. 8 0
      assets/resources/prefab/gameToast.prefab.meta
  37. 1 1
      assets/resources/prefab/login.prefab
  38. 5 2
      settings/project.json

+ 1 - 1
assets/Scene/Login.fire

@@ -159,7 +159,7 @@
       "__type__": "cc.Vec3",
       "x": 0,
       "y": 0,
-      "z": 510.0889628290344
+      "z": 500.808470339125
     },
     "_scale": {
       "__type__": "cc.Vec3",

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 262 - 326
assets/Scene/MyCityScene - 004.fire


+ 1 - 1
assets/Script/Login/Login.js

@@ -24,7 +24,7 @@ cc.Class({
        
         //如果不是微信环境
         if (typeof wx === 'undefined') {
-            console.log('cc.sys.platform:', cc.sys.platform);
+            // console.log('cc.sys.platform:', cc.sys.platform);
             // this.getNetworkUserInfo();
             this.h5();
             return;

+ 3 - 1
assets/Script/Network/GameNet.ts

@@ -1,3 +1,4 @@
+import utils from "../Network/netUtils";
 export default class GameNet{
     private static instance: GameNet = null;
     private ws: WebSocket = null;
@@ -15,7 +16,8 @@ export default class GameNet{
         if(this.ws != null)return;
         // https://www.yuyekeji.cn/api_dapp/index 192.168.0.106:26001 
         // wss://www.yuyekeji.cn/api_dapp/websocket/dappBack/
-        this.ws = new WebSocket(window['dappWss']+id);
+        console.log("utils.token:",utils.token);
+        this.ws = new WebSocket(window['dappWss']+id,["11"]);
         this.ws.onopen = (event: Event)=>{
             callback.call(target, "登录成功");
         }

+ 28 - 7
assets/Script/Login/dapp.js → assets/Script/Network/dapp.js

@@ -1,5 +1,5 @@
 
-import GameNet from "../Network/GameNet"
+import gameToast from "../Network/gameToast"
 import utils from "../Network/netUtils";
 cc.Class({
     extends: cc.Component,
@@ -12,12 +12,17 @@ cc.Class({
     onLoad() {
         cc.view.enableAutoFullScreen(false);
         cc.game.addPersistRootNode(this.node);
+        let _self = this;
 
         async function dappInit() {
-           let dapp = GlobalD.dapp = new Dapp()
+            let dapp = GlobalD.dapp = new Dapp()
+            // gameToast.getInstance().show("loding...",5,()=>{
+            //     console.log("finish toast!");
+            // },_self);
             try {
                 console.log('开始初始化dapp!')
-                await dapp.init()
+                const isTestNet = window['isTestNet'];
+                await dapp.init(isTestNet)
                 console.log("用户当前钱包地址:" + dapp.getAddress()) // 初始化成功,得到用户当前钱包地址
                 dapp.onAccountChanged((account) => {
                     console.log('当前钱包地址发生变化', account.address) // 用户钱包地址即为登录账户,使用过程中用户可以切换钱包地址,即游戏要进行当前地址退出登录,新地址重新登录的操作
@@ -45,9 +50,9 @@ cc.Class({
                     // 返回成功,见下面消息体
                     console.log(res)
                     GlobalD.Dapp.UserInfo = res;
-                    GameNet.getInstance().init(res.id, (data) => {
-                        console.log('GameNet:' + data);
-                    }, self);
+                    // GameNet.getInstance().init(res.id, (data) => {
+                    //     console.log('GameNet:' + data);
+                    // }, _self);
 
                     utils.get(utils.api.loginToken, { loginId: GlobalD.Dapp.UserInfo.id }, (res, value) => {
                         if (value.code == 0) {
@@ -61,6 +66,13 @@ cc.Class({
                                 userData.readData = _playerData;
                                 //跳转游戏
                                 cc.find("Canvas").getComponent("Login").loginButton();
+
+                                // GameNet.getInstance().init(GlobalD.Dapp.UserInfo.id, (data) => {
+                                //     console.log('GameNet:' + data);
+                                // }, _self);
+                                utils.init(GlobalD.Dapp.UserInfo.id, (data) => {
+                                    console.log('utils ws:' + data);
+                                }, _self);
                             })
                         } else {
                             console.log(res, value);
@@ -71,9 +83,18 @@ cc.Class({
                     console.log("dappInit userInfo 错误");
                     console.log(err)
                 }
+                // try {
+                //     const data = await dapp.getLoginSign()
+                //     console.log(data)
+                //     // this.signData = JSON.stringify(data)
+                // } catch (err) {
+                //     console.log(err)
+                //     alert('为了避免游戏资产被人乱用,还是校验下身份再进入游戏吧')
+                // }
+               
 
             } catch (err) {
-                console.log('catch到的错误:'+err) // 初始化失败,运行环境不是钱包环境
+                console.log('catch到的错误:' + err) // 初始化失败,运行环境不是钱包环境
             }
         }
         //初始化调用 dappInit;

+ 0 - 0
assets/Script/Login/dapp.js.meta → assets/Script/Network/dapp.js.meta


+ 72 - 0
assets/Script/Network/gameToast.ts

@@ -0,0 +1,72 @@
+
+export default class gameToast {
+    private static instance: gameToast = null;
+    private showObj: cc.Node = null;
+    private scheduleObj = null;
+    private callback = null;
+
+    private constructor() { }
+
+    public static getInstance(): gameToast {
+        if (gameToast.instance === null) {
+            gameToast.instance = new gameToast();
+        }
+        return gameToast.instance;
+    }
+
+    /**
+     * 显示toast
+     * @param content 显示的内容
+     * @param time 清除的时间
+     * @param callback 清除时候回调
+     */
+    public show(parent:cc.Node, content: string, time: number, callback: Function, target:cc.Component) {
+
+        this.callback = callback;
+        if(this.showObj){
+            this.showObj.parent = parent;
+            let DetailLabel = this.showObj.getChildByName('DetailLabel');
+            DetailLabel.getComponent(cc.Label).string = content;
+            this.scheduleObj = null;
+            target.unschedule(this.scheduleObj);
+            this.scheduleObj = target.scheduleOnce(() => {
+                if (callback) {
+                    callback();
+                    this.callback = null;
+                }
+                this.showObj.destroy();
+                this.showObj = null;
+            }, time);
+        }else{
+            cc.loader.loadRes("prefab/gameToast", function (err, texture) {
+                this.showObj = cc.instantiate(texture);
+                this.showObj.parent = parent;
+                let DetailLabel = this.showObj.getChildByName('DetailLabel');
+                DetailLabel.getComponent(cc.Label).string = content;
+    
+                this.scheduleObj = target.scheduleOnce(() => {
+                    if (callback) {
+                        callback();
+                        this.callback = null;
+                    }
+                    this.showObj.destroy();
+                    this.showObj = null;
+                }, time);
+            }.bind(this));
+        }
+
+    }
+
+    public hide(target:cc.Component) {
+        if (this.showObj) {
+            if(this.callback){
+                this.callback();
+            }
+            this.scheduleObj = null;
+            target.unschedule(this.scheduleObj);
+        }
+        this.callback = null;
+        this.showObj.destroy();
+        this.showObj = null;
+    }
+}

+ 9 - 0
assets/Script/Network/gameToast.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "f15a5ba2-0019-4f59-9cb5-a4c5b3f38191",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 22 - 0
assets/Script/Network/netUtils.ts

@@ -125,6 +125,28 @@ var utils = {
     //     console.log('aesKey:',aesKey);
     // }
 
+    init(id, callback: Function, target: any){
+        if(this.ws != null)return;
+        // https://www.yuyekeji.cn/api_dapp/index 192.168.0.106:26001 
+        // wss://www.yuyekeji.cn/api_dapp/websocket/dappBack/
+        console.log("utils.token:",utils.token);
+        this.ws = new WebSocket(window['dappWss']+id,["11"]);
+        this.ws.onopen = (event: Event)=>{
+            callback.call(target, "登录成功");
+        }
+ 
+        this.ws.onmessage = (event: MessageEvent)=>{
+            callback.call(target, event.data);
+        }
+
+        this.ws.onerror = function (e) {
+            console.error("WebSocket连接发生错误");
+        };
+    },
+    sendMsg(data: string){
+        if(this.ws != null && this.ws.readyState != WebSocket.OPEN)return;
+        this.ws.send(data);
+    }
 };
 
 

+ 226 - 0
assets/Script/adpp/ManageDapp.js

@@ -0,0 +1,226 @@
+/**
+ * 管理dapp相关信息
+ */
+import gameToast from "../Network/gameToast"
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        avatarFarmerSprite: {
+            default: null,
+            tip: "默认的头像",
+            type: cc.SpriteFrame,
+            serializable: true,
+        },
+        avatarVillageSprite: {
+            default: null,
+            tip: "村长的头像",
+            type: cc.SpriteFrame,
+            serializable: true,
+        },
+        avatarMayorSprite: {
+            default: null,
+            tip: "镇长的头像",
+            type: cc.SpriteFrame,
+            serializable: true,
+        },
+        avatarNode: {
+            default: null,
+            type: cc.Node,
+            serializable: true,
+        },
+        avatarButtonLabel: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+        avatarTipLabel: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+
+        villageTitle: {
+            default: '任职村长',
+            type: cc.String,
+            serializable: true,
+        },
+        villageContent: {
+            default: '村长可获得村民50%的CNT消费.',
+            type: cc.String,
+            serializable: true,
+        },
+        mayorTitle: {
+            default: '任职镇长',
+            type: cc.String,
+            serializable: true,
+        },
+        mayorContent: {
+            default: '镇长获得村民10%的CNT,成\n为镇长之后,村长的收益不会消\n失.',
+            type: cc.String,
+            serializable: true,
+        },
+        villageAndMayorNode: {
+            default: null,
+            type: cc.Node,
+            serializable: true
+        },
+
+        ToastParent: {
+            default: null,
+            type: cc.Node,
+            serializable: true
+        },
+    },
+
+    // LIFE-CYCLE CALLBACKS:
+
+    onLoad() {
+        this.villageAndMayorScript = this.villageAndMayorNode.getComponent("villageAndMayor");
+    },
+
+    start() {
+        /**
+         * 用户信息初始化到头像部分
+         * 
+         */
+
+        //    this.UserInfo =  {
+        //         "id": 1, // 账户ID
+        //         "pid": 0, // 上级ID,0未绑定,显示可绑定邀请码的按钮
+        //         "address": "TDw6xsVnDJWsdRBLkWAwXbv4hE2X2JQs5z", // 账户地址
+        //         "invite_code": "MzhISO1Mzt", // 本人邀请码
+        //         "agent_level": 0, // 0普通用户,1 村长身份,2 镇长身份
+        //         "create_time": "2021-12-30 09:23:18",
+        //         "parent": null // 上级不存在,上级存在时,返回上级对象,属性同本消息体一致
+        //     }
+        this.InitAvatarInfo();
+    },
+
+    InitAvatarInfo() {
+        let agent_level = GlobalD.Dapp.UserInfo.agent_level;  // 0普通用户,1 村长身份,2 镇长身份
+        switch (agent_level) {
+            case 0:
+                this.avatarNode.getComponent(cc.Sprite).spriteFrame = this.avatarFarmerSprite;
+                this.avatarButtonLabel.string = '申请村长';
+                this.avatarTipLabel.string = '村民';
+                break;
+            case 1:
+                this.avatarNode.getComponent(cc.Sprite).spriteFrame = this.avatarVillageSprite;
+                this.avatarButtonLabel.string = '任职镇长';
+                this.avatarTipLabel.string = '村长';
+                break;
+            case 2:
+                this.avatarNode.getComponent(cc.Sprite).spriteFrame = this.avatarMayorSprite;
+                this.avatarButtonLabel.node.active = false;
+                this.avatarTipLabel.string = '镇长';
+                break;
+
+        }
+    },
+
+    /**
+     * 根据按钮显示状态
+     */
+    onPromotionInfo() {
+        let agent_level = GlobalD.Dapp.UserInfo.agent_level;  // 0普通用户,1 村长身份,2 镇长身份
+        switch (agent_level) {
+            case 0:
+                this.avatarNode.getComponent(cc.Sprite).spriteFrame = this.avatarFarmerSprite;
+                this.villageAndMayorScript.setVillageAndMayorInfo({
+                    title: this.villageTitle, content: this.villageContent, confirmText: '申请', callback: () => {
+                        this._becomeVillageChief();
+                        this.villageAndMayorNode.active = false;
+                    }
+                });
+                break;
+            case 1:
+                this.avatarNode.getComponent(cc.Sprite).spriteFrame = this.avatarVillageSprite;
+                this.villageAndMayorScript.setVillageAndMayorInfo({
+                    title: this.mayorTitle, content: this.mayorContent, confirmText: '任职', callback: () => {
+                        this._applyMayor();
+                        this.villageAndMayorNode.active = false;
+                    }
+                });
+                break;
+            case 2:
+                this.avatarNode.getComponent(cc.Sprite).spriteFrame = this.avatarMayorSprite;
+                console.log("你已经不需要升级了!");
+                break;
+
+        }
+    },
+
+    _becomeVillageChief() {
+        if (!GlobalD.dapp) {
+            console.error("onBecomeVillageChief:dapp未初始化!");
+            return;
+        }
+
+
+        GlobalD.dapp.becomeVillageChief().then((data) => {
+            console.log("申请村长:"+ JSON.stringify(data));
+            const [err,tx] = data;
+            if (err === null) {
+                console.log('申请成功:'+tx) // 申请提交成功,等待审核
+                //成功设置村长状态,并且更新
+                GlobalD.Dapp.UserInfo.agent_level = 1;
+                this.InitAvatarInfo();
+                gameToast.getInstance().show(this.ToastParent, "申请成功!", 3, () => {
+                    console.log("finish toast!");
+                }, this);
+            } else {
+                console.log(err) // 申请失败
+                gameToast.getInstance().show(this.ToastParent, err, 3, () => {
+                    console.log("finish toast!");
+                }, this);
+            } 
+        })
+
+        // async function becomeInit() {
+        //     try {
+
+        //         const { err, tx } = await GlobalD.dapp.becomeVillageChief()
+        //         if (err === null) {
+        //             // TODO 成功, 任职村长需要区块确认,需要回调接口
+        //             console.log(tx) // 交易hash,唯一标识符
+        //         } else {
+        //             console.log(err)
+        //         }
+        //     } catch (err) {
+        //         console.error("申请村长:", JSON.stringify(err));
+        //     }
+        // }
+        // becomeInit();
+
+
+    },
+
+    _applyMayor() {
+        if (!GlobalD.dapp) {
+
+            console.error("onApplyMayor:dapp未初始化!");
+            return;
+        }
+        let _self = this;
+        GlobalD.dapp.applyMayor().then((data) => {
+            console.log("任职镇长:", JSON.stringify(data));
+            if (data.err === null) {
+                console.log(data.res) // 申请提交成功,等待审核
+                gameToast.getInstance().show(_self.ToastParent, data.res, 3, () => {
+                    console.log("finish toast!");
+                }, _self);
+            } else {
+                console.log(data.err) // 申请失败
+                gameToast.getInstance().show(_self.ToastParent, data.err, 3, () => {
+                    console.log("finish toast!");
+                }, _self);
+            }
+        })
+
+    }
+
+
+
+    // update (dt) {},
+});

+ 9 - 0
assets/Script/adpp/ManageDapp.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "87e5394c-808a-4059-9e45-5aa9dd2dff53",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
assets/Script/adpp/dapp-plugin.min.js


+ 9 - 0
assets/Script/adpp/dapp-plugin.min.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "0b4ce681-b122-4879-8a2f-9acaaade534d",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 101 - 29
assets/Script/adpp/inviteInfo.js

@@ -1,26 +1,50 @@
-// Learn cc.Class:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/class.html
-//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/class.html
-// Learn Attribute:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/reference/attributes.html
-//  - [English] http://docs.cocos2d-x.org/creator/manual/en/scripting/reference/attributes.html
-// Learn life-cycle callbacks:
-//  - [Chinese] https://docs.cocos.com/creator/manual/zh/scripting/life-cycle-callbacks.html
-//  - [English] https://www.cocos2d-x.org/docs/creator/manual/en/scripting/life-cycle-callbacks.html
-
+/**
+ * 绑定邀请码信息
+ */
+import gameToast from "../Network/gameToast"
 cc.Class({
     extends: cc.Component,
 
     properties: {
+        neighborValue: {
+            default: null,
+            type: cc.Label
+        },
+        neighborConsumValue: {
+            default: null,
+            type: cc.Label
+        },
+        neighborDirectValue: {
+            default: null,
+            type: cc.Label
+        },
+        farmerValue: {
+            default: null,
+            type: cc.Label
+        },
+        farmerConsumValue: {
+            default: null,
+            type: cc.Label
+        },
+
         myInviteValue: {
             default: null,
-            type: cc.Label // optional, default is typeof default
+            type: cc.Label
         },
         parentInviteValue: {
             default: null,
-            type: cc.Label // optional, default is typeof default
+            type: cc.Label
+        },
+        inputInviteValue: {
+            default: '',
+            visible: false
+        },
+
+        ToastParent: {
+            default: null,
+            type: cc.Node,
+            serializable: true
         },
-        inputInviteValue:'',
     },
 
     // LIFE-CYCLE CALLBACKS:
@@ -29,39 +53,87 @@ cc.Class({
 
     start() {
 
-        this.myInviteValue.string = GlobalD.Dapp.UserInfo.invite_code;
+    },
 
+    onOpenInviteInfo() {
+        if (!GlobalD.dapp) {
+            console.error("InviteInfo start,dapp未初始化!");
+            return;
+        }
+        this.node.active = true;
+        this.myInviteValue.string = GlobalD.Dapp.UserInfo.invite_code;
         if (GlobalD.Dapp.UserInfo.parent) {
             this.parentInviteValue.string = GlobalD.Dapp.UserInfo.parent;
         }
 
+        // {
+        //     "children_count": 1, // 直推下级数量
+        //     "team_count": 1, // 伞下成员数量(包含直推数量)
+        //     "children_village_chief_count": 1, // 直推村长数量(镇长身份才需要展示)
+        //     "children_cnt_amount": 0, // 直推下级租赁土地消费CNT业绩数量
+        //     "team_cnt_amount": 0 // 伞下团队租赁土地消费CNT数量(含直推数量)
+        // }
+        // 获取镇长/村长团队信息(村长或镇长身份才需要)
+        if (0 === GlobalD.Dapp.UserInfo.agent_level) {
+            console.log("村民不需要获取团队信息");
+            return;
+        }
+        GlobalD.dapp.teamData().then((data) => {
+            if (data.err === null) {
+                // 返回成功,见下面消息体
+                console.log("==========>" + JSON.stringify(data));
+                this.neighborValue.string = data.res.children_count;
+                this.neighborConsumValue.string = data.res.children_cnt_amount;
+                this.neighborDirectValue.string = data.res.children_village_chief_count;
+
+                this.farmerValue.string = data.res.team_count;
+                this.farmerConsumValue.string = data.res.team_cnt_amount;
+            } else {
+                //TODO 服务错误
+                console.log(data.err)
+                gameToast.getInstance().show(this.ToastParent, data.err, 3, () => {
+                    console.log("finish toast!");
+                }, this);
+            }
+        })
     },
 
-    inputInvite(value,e){
+    inputInvite(value, e) {
         console.log(value);
         this.inputInviteValue = value;
     },
 
     onBindInviteInfo() {
-        console.log('绑定的inputInviteValue:'+ this.inputInviteValue);
-        GlobalD.dapp.bindParent(this.inputInviteValue).then(( err, res)=>{
-            if (err === null) {
+        console.log('绑定的inputInviteValue:' + this.inputInviteValue);
+        if (!GlobalD.dapp) {
+            console.error("onBindInviteInfo warn,dapp未初始化!");
+            return;
+        }
+        let _self = this;
+        GlobalD.dapp.bindParent(this.inputInviteValue).then((data) => {
+            if (data.err === null) {
                 // 返回成功,见下面消息体
-                console.log(res)
+                console.log(data.res)
+                gameToast.getInstance().show(_self.ToastParent, data.res, 3, () => {
+                    console.log("finish toast!");
+                }, _self);
             } else {
                 //TODO 服务错误
-                console.log(err)
+                console.log(data.err)
+                gameToast.getInstance().show(_self.ToastParent, data.err, 3, () => {
+                    console.log("finish toast!");
+                }, _self);
             }
         })
     },
 
-    onClose(){
+    onClose() {
         this.node.active = false;
     },
 
-    webCopyString(){
+    webCopyString() {
         console.log('复制');
-    
+
         var input = GlobalD.Dapp.UserInfo.invite_code + '';
         const el = document.createElement('textarea');
         el.value = input;
@@ -70,7 +142,7 @@ cc.Class({
         el.style.position = 'absolute';
         el.style.left = '-9999px';
         el.style.fontSize = '12pt'; // Prevent zooming on iOS
-    
+
         const selection = getSelection();
         var originalRange = false;
         if (selection.rangeCount > 0) {
@@ -80,19 +152,19 @@ cc.Class({
         el.select();
         el.selectionStart = 0;
         el.selectionEnd = input.length;
-    
+
         var success = false;
         try {
             success = document.execCommand('copy');
-        } catch (err) {}
-    
+        } catch (err) { }
+
         document.body.removeChild(el);
-    
+
         if (originalRange) {
             selection.removeAllRanges();
             selection.addRange(originalRange);
         }
-    
+
         return success;
     },
     // update (dt) {},

+ 51 - 0
assets/Script/adpp/villageAndMayor.js

@@ -0,0 +1,51 @@
+/**
+ * 村长镇长信息面板
+ */
+cc.Class({
+    extends: cc.Component,
+
+    properties: {
+        title: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+        content: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+        callback: {
+            default: null,
+            visible: false
+        },
+        confirmLabel: {
+            default: null,
+            type: cc.Label,
+            serializable: true,
+        },
+
+      
+    },
+
+    /**
+     * 设置面板信息
+     */
+    setVillageAndMayorInfo(context) {
+        let { title, content, confirmText, callback } = context;
+        this.node.active = true;
+        this.callback = callback;
+        this.title.string = title;
+        this.content.string = content;
+        this.confirmLabel.string = confirmText;
+    },
+
+    onConfirm(e) {
+        if (this.callback)
+            this.callback(e);
+    },
+
+    onCancel(e) {
+        this.node.active = false;
+    }
+});

+ 9 - 0
assets/Script/adpp/villageAndMayor.js.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "1.0.5",
+  "uuid": "fca5929f-0092-435b-871d-41450e3793f5",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 44 - 97
assets/Script/public/GameData.js

@@ -63,90 +63,44 @@ cc.Class({
         }
     },
     start() {
-        let self = this;
         this._tiledMap = GlobalD.TiledMap._tiledMap;
-        // //todo 临时处理
-        // async function dappInit() {
-        //     const dapp = new Dapp()
-        //     try {
-        //         await dapp.init()
-        //         // 获取用户信息 xxx
-        //         const { err, res } = await dapp.userInfo()
-        //         if (err === null) {
-        //             // 返回成功,见下面消息体
-        //             console.log(res)
-        //             GlobalD.GameData.Dapp.UserInfo = res;
-        //             GlobalD.GameData.onStartGame();
-        //             GameNet.getInstance().init(res.id,(data)=>{
-        //                 console.log('GameNet:'+data);
-        //             }, self);
-
-        //         } else {
-        //             //TODO 服务错误
-        //             console.log(err)
-        //         }
-        //         const cntBalance = await dapp.cntBalance()
-        //         console.log(cntBalance) // string, 精度18,需要自行处理省略几位小数
-        //         GlobalD.GameData.SetCNT(cntBalance);
-        //         console.log("end**************");
-        //     } catch (err) {
-        //         console.log(err) // 初始化失败,运行环境不是钱包环境
-        //     }
-        // }
-        // //初始化调用 dappInit;
-        // dappInit();
-        try {
-            GlobalD.dapp.cntBalance().then((cntBalance) => {
-                console.log(cntBalance) // string, 精度18,需要自行处理省略几位小数
-                GlobalD.GameData.SetCNT(cntBalance);
-            });
-        } catch (err) {
-            console.log(err) // 初始化失败,运行环境不是钱包环境
-        }
-
-
-        this.readData = userData.readData;
-        cc.log('playerPullInfo 读取到数据?:', this.readData)
-        // this.Init();
-        this.InitNextworkData();
-        this.InitSceneInfo();
-    },
-
-    onStartGame() {
-        utils.get(utils.api.loginToken, { loginId: GlobalD.GameData.Dapp.UserInfo.id }, (res, value) => {
-            if (value.code == 0) {
-                /** 登录成功获取token */
-                utils.setToken(value.data.token);
-                // console.error("设置token,测试用。");
-                /** 推送信息 */
-                utils.get(utils.api.playerPullInfo, {}, (res, playerPullInfoTemp) => {
-                    let _playerData = JSON.parse(playerPullInfoTemp.data.playerData);
-                    //记录读取的数据到内存里面
-                    // 正常游戏
-                    this.readData = userData.readData = _playerData;
-                    // cc.log('playerPullInfo 读取到数据?:', this.readData)
-                    this.Init();
-                    this.InitSceneInfo();
-                })
-                //老铁 请选择 游戏模式
-                //true 每次进入清除数据模式
-                //false 正常带网络存档模式
-                // this.isDebugMode(false);
-            } else {
-                console.log(res, value);
-            }
-        })
+        //调用初始化dapp
+        this.isDebugMode(GlobalD.dapp);
     },
-
-    //设置游戏模式
-    isDebugMode: function (b) {
-        if (b) {
-            // 清除
-            this.onClearAllData();
-            this.getData();
-        } else {
+    /**
+     * 根据 不存在dapp 的话,使用本地测试
+     * @param {*} bInit 
+     */
+    isDebugMode: function (bInit) {
+        if (bInit) {
             //读取网络数据
+            try {
+                GlobalD.dapp.cntBalance().then((cntBalance) => {
+                    console.log(cntBalance) // string, 精度18,需要自行处理省略几位小数
+                    GlobalD.GameData.SetCNT(cntBalance);
+                });
+            } catch (err) {
+                console.error(err) // 初始化失败,运行环境不是钱包环境
+            }
+            this.readData = userData.readData;
+            cc.log('playerPullInfo 读取到数据?:', this.readData)
+            this.InitNextworkData();
+            this.InitSceneInfo();
 
+            // 自动存储数据
+            /**
+             * todo 如果退出游戏,触发一次存储。
+             */
+            this.AutoSaveData = function () {
+                this.pushData();
+            };
+            this.schedule(this.AutoSaveData, 20);
+        } else {
+            // 清除
+            cc.log("本地数据重新开始,并且不初始化");
+            // this.onClearAllData();
+            this.Init();
+            this.InitSceneInfo();
         }
     },
 
@@ -192,14 +146,6 @@ cc.Class({
 
         this.ManageUI.getComponent('ManageUI').Init();
 
-        // 自动存储数据
-        /**
-         * todo 如果退出游戏,触发一次存储。
-         */
-        this.AutoSaveData = function () {
-            this.pushData();
-        };
-        this.schedule(this.AutoSaveData, 20);
     },
     InitNextworkData() {
         console.log("this.readData", this.readData);
@@ -273,9 +219,11 @@ cc.Class({
         if (this.readData.TaskIconCountClick)
             task.TaskIconCountClick = this.readData.TaskIconCountClick;
     },
-    //InitData
+    /**
+     * 初始化
+     */
     Init: function () {
-        let _BFirstLoadGame = this.readData ? this.readData.BFirstLoadGame : 0;
+        let _BFirstLoadGame = false;//  this.readData ? this.readData.BFirstLoadGame : 0;
         //date
         this.GameYear = 0;
         this.GameMonth = 0;
@@ -369,7 +317,7 @@ cc.Class({
             1, //Holy Farmland
             1, //Holy Farmland seed
         ];
-        建筑物数量
+        //建筑物数量
         this.BuildingNumArray = [
             0, //公路
             0,  //路铲
@@ -432,7 +380,7 @@ cc.Class({
         this.LotteryTimes = 10;
 
         // 1 === _BFirstLoadGame
-        if (true) {
+        if (_BFirstLoadGame) {
             console.log("this.readData", this.readData);
             // cc.log('初始化网络数据');
             //读取日期数据
@@ -834,7 +782,6 @@ cc.Class({
         this.unschedule(this.AutoSaveData);
         //任务索引
         cc.sys.localStorage.removeItem('userdata');
-
         //跳回登录场景
         // cc.director.loadScene('Login');
     },
@@ -854,13 +801,13 @@ cc.Class({
             BFirstLoadGame: 1,//只要push数据,就证明已经开始第一次游戏了
 
             /**游戏不修改,默认值 start */
-            shareGive : this.shareGive,
+            shareGive: this.shareGive,
             //签到分享给钻石金币
-            signInGive : this.signInGive,
+            signInGive: this.signInGive,
             //每个月 给的 低保
-            EveryGive : this.EveryGive,
+            EveryGive: this.EveryGive,
             //公共分享
-            publicGive : this.publicGive,
+            publicGive: this.publicGive,
             /**游戏不修改,默认值 end */
 
             //时间

+ 1 - 1
assets/Script/public/ManageUI.js

@@ -478,7 +478,7 @@ cc.Class({
      * 绑定邀请
      */
     onInvite_Open(){
-        this.inviteNode.active = true;
+        this.inviteNode.getComponent("inviteInfo").onOpenInviteInfo();
     },
 
     //音效设置界面

+ 7 - 0
assets/UI/DApp.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "b7157452-19a1-43c7-9772-ba18277494a0",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

+ 7 - 0
assets/UI/DApp/avatar.meta

@@ -0,0 +1,7 @@
+{
+  "ver": "1.0.1",
+  "uuid": "f6b120de-c5bc-4dd5-bef1-47e48680e98e",
+  "isSubpackage": false,
+  "subpackageName": "",
+  "subMetas": {}
+}

BIN
assets/UI/DApp/avatar/farmer.png


+ 10 - 10
assets/UI/NOther/EveryDaySign/SNB.png.meta → assets/UI/DApp/avatar/farmer.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "b5011206-2445-44b1-b41b-51497aa72acd",
+  "uuid": "6a02d298-f221-42db-b698-26283d29f354",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,19 +9,19 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "SNB": {
+    "farmer": {
       "ver": "1.0.4",
-      "uuid": "b5f08acf-1bf5-4f36-8005-633dc86435a9",
-      "rawTextureUuid": "b5011206-2445-44b1-b41b-51497aa72acd",
+      "uuid": "3f6e0c99-e2f0-4858-9623-5ec08b6c5fd5",
+      "rawTextureUuid": "6a02d298-f221-42db-b698-26283d29f354",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
-      "offsetX": 0.5,
-      "offsetY": 1,
-      "trimX": 5,
-      "trimY": 5,
-      "width": 72,
-      "height": 69,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 81,
+      "height": 81,
       "rawWidth": 81,
       "rawHeight": 81,
       "borderTop": 0,

BIN
assets/UI/DApp/avatar/mayor.png


+ 6 - 6
assets/UI/NOther/EveryDaySign/CNT.png.meta → assets/UI/DApp/avatar/mayor.png.meta

@@ -1,6 +1,6 @@
 {
   "ver": "2.3.3",
-  "uuid": "42963c58-e7a5-49bb-8080-a520c0317f4b",
+  "uuid": "ee0df56b-fd54-4361-af84-930df56ab77c",
   "type": "sprite",
   "wrapMode": "clamp",
   "filterMode": "bilinear",
@@ -9,19 +9,19 @@
   "packable": true,
   "platformSettings": {},
   "subMetas": {
-    "CNT": {
+    "mayor": {
       "ver": "1.0.4",
-      "uuid": "3da6291f-267a-4c2f-aa72-9f0a0ee3247e",
-      "rawTextureUuid": "42963c58-e7a5-49bb-8080-a520c0317f4b",
+      "uuid": "bca97227-ce55-48d1-a48a-a03efab9b199",
+      "rawTextureUuid": "ee0df56b-fd54-4361-af84-930df56ab77c",
       "trimType": "auto",
       "trimThreshold": 1,
       "rotated": false,
       "offsetX": 0,
       "offsetY": 0,
       "trimX": 0,
-      "trimY": 7,
+      "trimY": 0,
       "width": 81,
-      "height": 67,
+      "height": 81,
       "rawWidth": 81,
       "rawHeight": 81,
       "borderTop": 0,

BIN
assets/UI/DApp/avatar/village.png


+ 34 - 0
assets/UI/DApp/avatar/village.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "673ec0d6-45d9-47a7-8594-8e52ca824415",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "village": {
+      "ver": "1.0.4",
+      "uuid": "d233ad9b-7057-429e-aee7-9c4a17dc5972",
+      "rawTextureUuid": "673ec0d6-45d9-47a7-8594-8e52ca824415",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 81,
+      "height": 81,
+      "rawWidth": 81,
+      "rawHeight": 81,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NOther/EveryDaySign/CNT.png


BIN
assets/UI/NOther/EveryDaySign/CNTIcon.png


+ 34 - 0
assets/UI/NOther/EveryDaySign/CNTIcon.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "f45948be-82f7-48d0-85ca-6d65ed5efd4e",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "CNTIcon": {
+      "ver": "1.0.4",
+      "uuid": "1caaef5a-2dee-4b32-afbe-aff7bfa3fcde",
+      "rawTextureUuid": "f45948be-82f7-48d0-85ca-6d65ed5efd4e",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": -0.5,
+      "offsetY": 1.5,
+      "trimX": 1,
+      "trimY": 1,
+      "width": 78,
+      "height": 76,
+      "rawWidth": 81,
+      "rawHeight": 81,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/UI/NOther/EveryDaySign/SNB.png


BIN
assets/UI/NOther/EveryDaySign/SNBIcon.png


+ 34 - 0
assets/UI/NOther/EveryDaySign/SNBIcon.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "a3072808-8821-457c-97eb-c7f1da3a7900",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "SNBIcon": {
+      "ver": "1.0.4",
+      "uuid": "d5039c08-db94-4b5f-9e8c-ecd1f614f817",
+      "rawTextureUuid": "a3072808-8821-457c-97eb-c7f1da3a7900",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": -0.5,
+      "trimX": 1,
+      "trimY": 4,
+      "width": 79,
+      "height": 74,
+      "rawWidth": 81,
+      "rawHeight": 81,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

BIN
assets/resources/login/shennongStartBgNew.png


+ 34 - 0
assets/resources/login/shennongStartBgNew.png.meta

@@ -0,0 +1,34 @@
+{
+  "ver": "2.3.3",
+  "uuid": "3976aa96-4c0d-44e6-be6b-2dcf825e5576",
+  "type": "sprite",
+  "wrapMode": "clamp",
+  "filterMode": "bilinear",
+  "premultiplyAlpha": false,
+  "genMipmaps": false,
+  "packable": true,
+  "platformSettings": {},
+  "subMetas": {
+    "shennongStartBgNew": {
+      "ver": "1.0.4",
+      "uuid": "0e4f6c70-c999-4425-ba1f-7d37c9dfbe0e",
+      "rawTextureUuid": "3976aa96-4c0d-44e6-be6b-2dcf825e5576",
+      "trimType": "auto",
+      "trimThreshold": 1,
+      "rotated": false,
+      "offsetX": 0,
+      "offsetY": 0,
+      "trimX": 0,
+      "trimY": 0,
+      "width": 720,
+      "height": 1280,
+      "rawWidth": 720,
+      "rawHeight": 1280,
+      "borderTop": 0,
+      "borderBottom": 0,
+      "borderLeft": 0,
+      "borderRight": 0,
+      "subMetas": {}
+    }
+  }
+}

+ 409 - 0
assets/resources/prefab/gameToast.prefab

@@ -0,0 +1,409 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "",
+    "_objFlags": 0,
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "asyncLoadAssets": false,
+    "readonly": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "SeneceTaskIcon",
+    "_objFlags": 0,
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 6
+      },
+      {
+        "__id__": 9
+      }
+    ],
+    "_active": true,
+    "_level": 1,
+    "_components": [],
+    "_prefab": {
+      "__id__": 12
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 100
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "mask",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 4
+      }
+    ],
+    "_prefab": {
+      "__id__": 5
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 2000,
+      "height": 2000
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": false,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "a23235d1-15db-4b95-8439-a2e005bfff91"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.BlockInputEvents",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5ace49cb-84f4-4500-80fc-e85bd122c48e"
+    },
+    "fileId": "27G4UC7n1C1KsLUZHQYT6w",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "bg",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 2,
+    "_components": [
+      {
+        "__id__": 7
+      }
+    ],
+    "_prefab": {
+      "__id__": 8
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 557,
+      "height": 57
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 6
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_srcBlendFactor": 770,
+    "_dstBlendFactor": 771,
+    "_spriteFrame": {
+      "__uuid__": "7ca171ed-7969-4360-9cd9-2a6277e72bad"
+    },
+    "_type": 0,
+    "_sizeMode": 0,
+    "_fillType": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5ace49cb-84f4-4500-80fc-e85bd122c48e"
+    },
+    "fileId": "19nPYa/XFBf4KUDUAQn5v3",
+    "sync": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "DetailLabel",
+    "_objFlags": 0,
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_level": 3,
+    "_components": [
+      {
+        "__id__": 10
+      }
+    ],
+    "_prefab": {
+      "__id__": 11
+    },
+    "_opacity": 255,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 70.05,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_position": {
+      "__type__": "cc.Vec3",
+      "x": -0.3,
+      "y": 0,
+      "z": 0
+    },
+    "_scale": {
+      "__type__": "cc.Vec3",
+      "x": 1,
+      "y": 1,
+      "z": 1
+    },
+    "_eulerAngles": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "z": 0
+    },
+    "_skewX": 0,
+    "_skewY": 0,
+    "_is3DNode": false,
+    "groupIndex": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "node": {
+      "__id__": 9
+    },
+    "_enabled": true,
+    "_materials": [
+      {
+        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
+      }
+    ],
+    "_useOriginalSize": false,
+    "_string": "loding...",
+    "_N$string": "loding...",
+    "_fontSize": 20,
+    "_lineHeight": 40,
+    "_enableWrapText": true,
+    "_N$file": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_batchAsBitmap": false,
+    "_N$horizontalAlign": 0,
+    "_N$verticalAlign": 1,
+    "_N$fontFamily": "Arial",
+    "_N$overflow": 0,
+    "_N$cacheMode": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5ace49cb-84f4-4500-80fc-e85bd122c48e"
+    },
+    "fileId": "78bMkpOMVPzZIp36ylNDiW",
+    "sync": false
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__uuid__": "5ace49cb-84f4-4500-80fc-e85bd122c48e"
+    },
+    "fileId": "95NHeUxnJOoZea8hBtGYHe",
+    "sync": false
+  }
+]

+ 8 - 0
assets/resources/prefab/gameToast.prefab.meta

@@ -0,0 +1,8 @@
+{
+  "ver": "1.2.1",
+  "uuid": "5ace49cb-84f4-4500-80fc-e85bd122c48e",
+  "optimizationPolicy": "AUTO",
+  "asyncLoadAssets": false,
+  "readonly": false,
+  "subMetas": {}
+}

+ 1 - 1
assets/resources/prefab/login.prefab

@@ -151,7 +151,7 @@
     "_srcBlendFactor": 770,
     "_dstBlendFactor": 771,
     "_spriteFrame": {
-      "__uuid__": "953e6290-0816-42d1-b462-cbe1b91bb3fb"
+      "__uuid__": "0e4f6c70-c999-4425-ba1f-7d37c9dfbe0e"
     },
     "_type": 0,
     "_sizeMode": 0,

+ 5 - 2
settings/project.json

@@ -11,7 +11,10 @@
   ],
   "design-resolution-height": 640,
   "design-resolution-width": 960,
-  "excluded-modules": [],
+  "excluded-modules": [
+    "3D",
+    "3D Primitive"
+  ],
   "facebook": {
     "appID": "",
     "audience": {
@@ -28,7 +31,7 @@
     "default",
     "GameUI"
   ],
-  "last-module-event-record-time": 1640618135023,
+  "last-module-event-record-time": 1641294252008,
   "simulator-orientation": false,
   "simulator-resolution": {
     "height": 640,

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott