dzduole 1 月之前
父节点
当前提交
3d2372d150

+ 0 - 3
art/fgui/.objs/metas/isxx5ak7/kt443qc.info

@@ -22,9 +22,6 @@
     },
     "n45_ixm4": {
       "collapsed": true
-    },
-    "n46_ixm4": {
-      "collapsed": true
     }
   },
   "fitScreen": "FitSize",

+ 1 - 1
art/fgui/assets/game/UIGame/component/Component45.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="83,102">
-  <controller name="c1" alias="游戏顶部显示" exported="true" pages="0,金币,1,分数" selected="0"/>
+  <controller name="c1" alias="游戏顶部显示" exported="true" pages="0,金币,1,分数" selected="1"/>
   <displayList>
     <image id="n40_iveg" name="n40" src="hkrz3ri" fileName="UIGame/asset/yy_szk.png" xy="3,0"/>
     <image id="n41_iveg" name="n41" src="wehi3ui" fileName="UIMoney/asset/ty_jb.png" xy="17,6">

+ 4 - 4
art/fgui/assets/game/UIMain/UIMain.xml

@@ -14,7 +14,7 @@
       <relation target="n10_ixm4" sidePair="bottom-bottom"/>
       <relation target="" sidePair="width-width"/>
     </image>
-    <component id="n15_ixm4" name="shopBtn" src="n43d3vn" fileName="UIMain/component/dh_zy_sc_guang.xml" xy="1153,662" size="110,85">
+    <component id="n15_ixm4" name="shopBtn" src="n43d3vn" fileName="UIMain/component/dh_zy_sc_guang.xml" xy="1182,662" size="110,85">
       <relation target="" sidePair="right-right"/>
       <relation target="n10_ixm4" sidePair="bottom-bottom"/>
     </component>
@@ -36,9 +36,9 @@
     <group id="n45_ixm4" name="n45" xy="923,121" size="411,96" advanced="true">
       <relation target="n10_ixm4" sidePair="left-right%"/>
     </group>
-    <component id="n27_ixm4" name="secretaryBtn" src="ixm43xw" fileName="UIMain/component/Component13.xml" xy="876,662" size="45,85" group="n46_ixm4"/>
-    <component id="n28_ixm4" name="rankBtn" src="ixm43xz" fileName="UIMain/component/Component16.xml" xy="1051,708" size="0,1" group="n46_ixm4"/>
-    <group id="n46_ixm4" name="n46" xy="876,662" size="110,85" advanced="true">
+    <component id="n27_ixm4" name="secretaryBtn" src="ixm43xw" fileName="UIMain/component/Component13.xml" xy="841,662" size="68,85" group="n46_ixm4"/>
+    <component id="n28_ixm4" name="rankBtn" src="ixm43xz" fileName="UIMain/component/Component16.xml" xy="1001,708" size="0,1" group="n46_ixm4"/>
+    <group id="n46_ixm4" name="n46" xy="841,662" size="119,85" advanced="true">
       <relation target="n86_r4l5" sidePair="right-right"/>
     </group>
     <component id="n86_r4l5" name="ganFaMoShiBtn" src="r4l5v577" fileName="UIMain/component/Component1302.xml" xy="1016,662" size="110,85">

二进制
client/laya/bin/asset/fgui/game.obj


+ 1 - 1
client/laya/bin/fileconfig.json

@@ -1 +1 @@
-{}
+{"spine/nvmishu.json":["spine/nvmishu/",[]]}

+ 53 - 16
client/laya/bin/js/bundle.js

@@ -1376,12 +1376,17 @@
             this.templet = new Laya.Templet();
             this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete);
             this.templet.on(Laya.Event.ERROR, this, this.onError);
-            this.templet.loadAni(`spine/${name}.sk`);
+            if (name === 'mishu') {
+                this.templet.loadAni('spine/nvmishu.sk');
+            }
+            else {
+                this.templet.loadAni(`spine/${name}.sk`);
+            }
             this.templet.lock = true;
             this.spineName = name;
         }
         onError() {
-            console.log("spine加载出错");
+            console.log("zh:spine加载出错");
         }
         parseComplete() {
             this.loaded = true;
@@ -5194,7 +5199,7 @@
                 scale = 1.2;
             }
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            node.play(data, 1, true, parent);
+            node.play(data, 0, true, parent);
         }
         turnLeft() {
             this.curIndex--;
@@ -5441,7 +5446,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         interuptSecretary() {
             Laya.timer.clearAll(this);
@@ -5659,7 +5664,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         closeSelf() {
             this.hide();
@@ -5923,7 +5928,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         returnUIMain() {
             this.hide();
@@ -6198,7 +6203,8 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            console.log("zh:playSecretaryIdle", data);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         startGame(type) {
             xGame.common.gameMode = type;
@@ -6599,7 +6605,7 @@
                     break;
             }
         }
-        playSecretaryAni() {
+        playSecretaryAni_old() {
             let parent = this.ui.secretary.displayObject;
             parent.destroyChildren();
             let xx = this.ui.secretary.width / 2;
@@ -6616,6 +6622,21 @@
                 xGame.common.secretary.play(data, 0, true, parent);
             }
         }
+        playSecretaryAni() {
+            let parent = this.ui.secretary.displayObject;
+            parent.destroyChildren();
+            let xx = this.ui.secretary.width / 2;
+            let yy = this.ui.secretary.height;
+            let scale = xGame.common.getSecretaryScale();
+            let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
+            if (this.success) {
+                let rand = 0;
+                xGame.common.secretary.play(data, 0, true, parent);
+            }
+            else {
+                xGame.common.secretary.play(data, 0, true, parent);
+            }
+        }
         restartGame() {
             switch (xGame.common.gameMode) {
                 case GameMode.classic:
@@ -10338,7 +10359,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
     }
     UIDraw.uiName = "UIDraw";
@@ -18523,7 +18544,7 @@
                     break;
             }
         }
-        playSecretaryAni() {
+        playSecretaryAni_old() {
             let parent = this.ui.secretary.displayObject;
             parent.destroyChildren();
             let xx = this.ui.secretary.width / 2;
@@ -18540,6 +18561,21 @@
                 xGame.common.secretary.play(data, 0, true, parent);
             }
         }
+        playSecretaryAni() {
+            let parent = this.ui.secretary.displayObject;
+            parent.destroyChildren();
+            let xx = this.ui.secretary.width / 2;
+            let yy = this.ui.secretary.height;
+            let scale = xGame.common.getSecretaryScale();
+            let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
+            if (this.success) {
+                let rand = 0;
+                xGame.common.secretary.play(data, 0, true, parent);
+            }
+            else {
+                xGame.common.secretary.play(data, 0, true, parent);
+            }
+        }
         restartGame() {
             switch (xGame.common.gameMode) {
                 case GameMode.classic:
@@ -19244,7 +19280,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         returnUIMain() {
             this.hide();
@@ -19768,7 +19804,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
     }
     UIDraw$1.uiName = "UIDraw";
@@ -19954,7 +19990,7 @@
                 scale = 1.2;
             }
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            node.play(data, 1, true, parent);
+            node.play(data, 0, true, parent);
         }
         turnLeft() {
             this.curIndex--;
@@ -20185,7 +20221,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         interuptSecretary() {
             Laya.timer.clearAll(this);
@@ -20383,7 +20419,7 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         closeSelf() {
             this.hide();
@@ -20628,7 +20664,8 @@
             let yy = this.ui.secretary.height;
             let scale = xGame.common.getSecretaryScale();
             let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-            xGame.common.secretary.play(data, 1, true, parent);
+            console.log("zh:playSecretaryIdle", data);
+            xGame.common.secretary.play(data, 0, true, parent);
         }
         startGame(type) {
             xGame.common.gameMode = type;

文件差异内容过多而无法显示
+ 0 - 0
client/laya/bin/js/bundle.js.map


+ 16 - 8
client/laya/src/core/mgrs/SpineMgr.ts

@@ -12,24 +12,24 @@ export default class SpineMgr {
         this.templet.on(Laya.Event.ERROR, this, this.onError);
 
         //zh替换动画
-        // if(name==='mishu'){
-        //     this.templet.loadAni('spine/nvmishu.sk');
-        // }else{
-        //     this.templet.loadAni(`spine/${name}.sk`);
-        // }
+        if(name==='mishu'){
+            this.templet.loadAni('spine/nvmishu.sk');
+        }else{
+            this.templet.loadAni(`spine/${name}.sk`);
+        }
         
-        this.templet.loadAni(`spine/${name}.sk`);   //原先的代码
+       // this.templet.loadAni(`spine/${name}.sk`);   //原先的代码
 
         this.templet.lock = true;
         this.spineName = name;
     }
     onError() {
-        console.log("spine加载出错");
+        console.log("zh:spine加载出错");
     }
     parseComplete() {
         this.loaded = true;
         this.loadedCallback && this.loadedCallback();
-        //console.log("加载成功!");
+       // console.log("zh:spinemgr 加载成功!");
     }
     dispose() {
         if (this.templet && !this.templet.destroyed) {
@@ -47,18 +47,23 @@ export default class SpineMgr {
      * @returns 
      */
     play(data, aniIndex, isLoop = true, parent, callback?, mySpine: Laya.Skeleton = null): Laya.Skeleton {
+       // console.log('zh:a1')
         if (!this.loaded) {
+            // console.log('zh:a2')
             return;
         }
         //创建一个动画
         let spine;
         if (mySpine) {
+            // console.log('zh:a3')
             spine = mySpine;
         }
         else {
+            // console.log('zh:a4')
             spine = this.createSpine(data, parent);
         }
         //播放
+        // console.log('zh:a5')
         spine.play(aniIndex, isLoop, true, 0, 0, true);
         if (!isLoop) {
             spine.on(Laya.Event.STOPPED, this, () => {
@@ -66,9 +71,11 @@ export default class SpineMgr {
                 callback && callback(spine);
             });
         }
+        // console.log('zh:a7')
         return spine
     }
     createSpine(data, parent, type = 1) {
+       // console.log('zh:createSpine parent='+parent)
         //创建第一个动画
         let spine: Laya.Skeleton;
         //从动画模板创建动画播放对象
@@ -80,4 +87,5 @@ export default class SpineMgr {
         spine.scale(data.scaleX, data.scaleY, true);
         return spine
     }
+
 }

+ 2 - 1
client/laya/src/ui/UIDraw.ts

@@ -222,7 +222,8 @@ export default class UIDraw extends UIBase {
         let yy = this.ui.secretary.height;
         let scale = xGame.common.getSecretaryScale();
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        xGame.common.secretary.play(data, 1, true, parent);
+        //xGame.common.secretary.play(data, 1, true, parent);
+        xGame.common.secretary.play(data, 0, true, parent);
     }
 }
 UIDraw.uiName = "UIDraw";

+ 21 - 1
client/laya/src/ui/UIGameEnd.ts

@@ -309,7 +309,7 @@ export default class UIGameEnd extends UIBase {
         }
 
     }
-    playSecretaryAni() {
+    playSecretaryAni_old() {
         let parent = this.ui.secretary.displayObject;
         parent.destroyChildren();
         let xx = this.ui.secretary.width / 2
@@ -327,6 +327,26 @@ export default class UIGameEnd extends UIBase {
             xGame.common.secretary.play(data, 0, true, parent);
         }
     }
+
+    playSecretaryAni() {
+        let parent = this.ui.secretary.displayObject;
+        parent.destroyChildren();
+        let xx = this.ui.secretary.width / 2
+        let yy = this.ui.secretary.height;
+        let scale = xGame.common.getSecretaryScale();
+        let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
+        if (this.success) {
+            //let rand = Math.random() <= 0.5 ? 2 : 3;
+            let rand = 0;//只有一个动画
+             xGame.common.secretary.play(data, 0, true, parent);
+        }
+        else {
+            //失败特效
+            xGame.common.secretary.play(data, 0, true, parent);
+        }
+    }
+
+
     restartGame() {
         switch (xGame.common.gameMode) {
             case GameMode.classic:

+ 7 - 1
client/laya/src/ui/UIMain.ts

@@ -177,9 +177,15 @@ export default class UIMain extends UIBase {
         parent.destroyChildren();
         let xx = this.ui.secretary.width / 2;
         let yy = this.ui.secretary.height;
+
+      //  xx = Laya.stage.width / 2;
+      //  yy = Laya.stage.height;
         let scale = xGame.common.getSecretaryScale();
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        xGame.common.secretary.play(data, 1, true, parent);
+        console.log("zh:playSecretaryIdle", data);
+        //xGame.common.secretary.play(data, 1, true, parent);  这是老的秘书
+         
+        xGame.common.secretary.play(data, 0, true, parent);
     }
     startGame(type: GameMode) {
         //进入游戏页面

+ 2 - 1
client/laya/src/ui/UISecretary.ts

@@ -72,7 +72,8 @@ export default class UISecretary extends UIBase {
             scale = 1.2
         }
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        node.play(data, 1, true, parent);
+        //node.play(data, 1, true, parent);
+        node.play(data, 0, true, parent);
     }
     public turnLeft() {
         this.curIndex--;

+ 2 - 1
client/laya/src/ui/UIShop.ts

@@ -58,7 +58,8 @@ export default class UIShop extends UIBase {
         let yy = this.ui.secretary.height;
         let scale = xGame.common.getSecretaryScale();
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        xGame.common.secretary.play(data, 1, true, parent);
+       // xGame.common.secretary.play(data, 1, true, parent);
+        xGame.common.secretary.play(data, 0, true, parent);
     }
     interuptSecretary() {
         Laya.timer.clearAll(this);

+ 2 - 1
client/laya/src/ui/UISign.ts

@@ -91,7 +91,8 @@ export default class UISign extends UIBase {
         let yy = this.ui.secretary.height;
         let scale = xGame.common.getSecretaryScale();
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        xGame.common.secretary.play(data, 1, true, parent);
+       // xGame.common.secretary.play(data, 1, true, parent);
+         xGame.common.secretary.play(data, 0, true, parent);
     }
     closeSelf() {
         this.hide();

+ 2 - 1
client/laya/src/ui/UISkill.ts

@@ -137,7 +137,8 @@ export default class UISkill extends UIBase {
         let yy = this.ui.secretary.height;
         let scale = xGame.common.getSecretaryScale();
         let data = { x: xx, y: yy, scaleX: scale, scaleY: scale };
-        xGame.common.secretary.play(data, 1, true, parent);
+       // xGame.common.secretary.play(data, 1, true, parent);
+        xGame.common.secretary.play(data, 0, true, parent);
     }
     returnUIMain() {
         this.hide();

部分文件因为文件数量过多而无法显示