Prechádzať zdrojové kódy

关卡超出配置关卡处理

zhaochengyang 5 rokov pred
rodič
commit
abbcb87f43
19 zmenil súbory, kde vykonal 123 pridanie a 86 odobranie
  1. 1 1
      .laya/wxgame.json
  2. 17 0
      .rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/1ea3d75712a33a35bef99a31c0ac75811509f53f
  3. 2 2
      .rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/e3900355ccc95b6673ff8c8c6beaf5ce6774ab0b
  4. 0 17
      .rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/3b548294b8caa5ea273065fc91cf40992c186cfc
  5. 17 0
      .rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/97d1e008506c070c9d6b8b42aaa8d4cbc33d4ef8
  6. 0 17
      .rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/b3268d94d841101e034a6412a8e68045a049f48c
  7. 17 0
      .rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/1ea3d75712a33a35bef99a31c0ac75811509f53f
  8. 2 2
      .rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/e3900355ccc95b6673ff8c8c6beaf5ce6774ab0b
  9. 0 17
      .rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/3b548294b8caa5ea273065fc91cf40992c186cfc
  10. 0 17
      .rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/59e9d5c5237a0bdb039327a4f2877759e8b30d8e
  11. 17 0
      .rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/97d1e008506c070c9d6b8b42aaa8d4cbc33d4ef8
  12. 19 2
      bin/js/bundle.js
  13. 1 1
      bin/js/bundle.js.map
  14. 6 6
      release/wxgame/game.json
  15. 1 1
      release/wxgame/js/bundle.js
  16. 1 1
      release/wxgame/js/bundle.js.map
  17. 4 0
      src/Net/PlayerData.ts
  18. 18 0
      src/Tool/DropRule.ts
  19. 0 2
      src/View/InGameView.ts

+ 1 - 1
.laya/wxgame.json

@@ -64,5 +64,5 @@
     "forceCompile": false,
     "onlyIndexJS": true,
     "projectType": "ts",
-    "pubTime": 1579510325148
+    "pubTime": 1579513157961
 }

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 17 - 0
.rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/1ea3d75712a33a35bef99a31c0ac75811509f53f


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 2
.rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/e3900355ccc95b6673ff8c8c6beaf5ce6774ab0b


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 17
.rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/3b548294b8caa5ea273065fc91cf40992c186cfc


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 17 - 0
.rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/97d1e008506c070c9d6b8b42aaa8d4cbc33d4ef8


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 17
.rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/b3268d94d841101e034a6412a8e68045a049f48c


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 17 - 0
.rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/1ea3d75712a33a35bef99a31c0ac75811509f53f


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 2 - 2
.rpt2_cache/rpt2_4a9d91541e38d5aa3994fade33b06c6f8ad825fc/code/cache/e3900355ccc95b6673ff8c8c6beaf5ce6774ab0b


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 17
.rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/3b548294b8caa5ea273065fc91cf40992c186cfc


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 17
.rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/59e9d5c5237a0bdb039327a4f2877759e8b30d8e


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 17 - 0
.rpt2_cache/rpt2_596ef66ef1fe2aeed3119ab24f1893567fd58f33/code/cache/97d1e008506c070c9d6b8b42aaa8d4cbc33d4ef8


+ 19 - 2
bin/js/bundle.js

@@ -250,6 +250,9 @@ var laya = (function (exports) {
         get AddForce() {
             return this.netzheshe["AddForce"];
         }
+        get LimitScore() {
+            return this.netzheshe["LimitScore"];
+        }
         get touchsize() {
             return Number(this.netzheshe["touchsize"]);
         }
@@ -1526,6 +1529,22 @@ var laya = (function (exports) {
                     }
                 }
             }
+            if (this.STAGE > level.length) {
+                let Level = level[Number(level.length - 1)];
+                let score = Number(Level.goal);
+                this.DropHeight = Number(Level.hight);
+                this.GoalScore = Number(Level.goal);
+                this.GoalScore = (this.STAGE - level.length) * AccountManager.Instance.curplayerData.LimitScore + this.GoalScore;
+                this.SizeIndex = Level.index.split(";");
+                this.BallNum = Level.edge.split(";");
+                this.StartNum = Number(Level.start_number);
+                this.DropNum = Level.drop_number.split(";");
+                this.EdgeIndex = Level.edgeindex.split(";");
+                let min = Number(this.BallNum[0]);
+                let minnext = Number(this.BallNum[this.BallNum.length - 1]);
+                this.MinBall = Number(this.PrefabName[min - 1]);
+                this.MinNextBall = Number(this.PrefabName[minnext - 1]);
+            }
             this.Read();
         }
         InitEffect() {
@@ -2388,8 +2407,6 @@ var laya = (function (exports) {
             }
         }
         Show() {
-            let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
-            this.STAGE = Number(stage);
             Laya.timer.loop(AccountManager.Instance.curplayerData.Save * 1000, this, this.Save);
             Laya.timer.once(200, this, this.SkillRefresh);
             Laya.timer.frameLoop(2, this, this.CheckHeight);

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
bin/js/bundle.js.map


+ 6 - 6
release/wxgame/game.json

@@ -1,7 +1,7 @@
 {"deviceOrientation":"portrait","showStatusBar":false,"networkTimeout":{"request":10000,"connectSocket":10000,"uploadFile":10000,"downloadFile":10000},
-    "subpackages": [
-      {
-        "name": "Game",
-        "root": "Game/res"
-      }
-    ],"openDataContext":"BtmopenDataContext"}
+"subpackages": [
+  {
+    "name": "Game",
+    "root": "Game/res"
+  }
+],"openDataContext":"BtmopenDataContext"}

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
release/wxgame/js/bundle.js


Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
release/wxgame/js/bundle.js.map


+ 4 - 0
src/Net/PlayerData.ts

@@ -157,6 +157,10 @@ export class PlayerData {
     public get AddForce():number{
         return this.netzheshe["AddForce"]
     }
+    //获取超出最大配置关卡的 关卡目标分数
+    public get LimitScore():number{
+        return this.netzheshe["LimitScore"]
+    }
     public get touchsize():number
     {
         return Number(this.netzheshe["touchsize"]);

+ 18 - 0
src/Tool/DropRule.ts

@@ -101,6 +101,24 @@ export class DropRule{
                 }
             }
         }
+        if(this.STAGE>level.length){
+            let Level = level[Number(level.length - 1)];
+            let score = Number(Level.goal);
+            // let Level = level[Number(key)];
+            this.DropHeight = Number(Level.hight);
+            this.GoalScore = Number(Level.goal);
+            this.GoalScore = (this.STAGE - level.length) * AccountManager.Instance.curplayerData.LimitScore + this.GoalScore;
+            this.SizeIndex = Level.index.split(";");
+            this.BallNum = Level.edge.split(";");
+            this.StartNum = Number(Level.start_number);
+            this.DropNum = Level.drop_number.split(";");
+            this.EdgeIndex = Level.edgeindex.split(";");
+            let min = Number(this.BallNum[0]);
+            let minnext = Number(this.BallNum[this.BallNum.length - 1]);
+            //获取消除道具中 本局 最小球 及 次小球
+            this.MinBall = Number(this.PrefabName[min - 1]);
+            this.MinNextBall = Number(this.PrefabName[minnext - 1]);
+        }
         this.Read();
     }
     //特效

+ 0 - 2
src/View/InGameView.ts

@@ -48,8 +48,6 @@ export default class InGameView extends ui.InGameSceneUI implements SC{
         }
     }
     Show(){
-        let stage = AccountManager.Instance.curplayerData.GainAccount("stage");
-        this.STAGE = Number(stage);
         Laya.timer.loop(AccountManager.Instance.curplayerData.Save * 1000,this,this.Save);
         Laya.timer.once(200,this,this.SkillRefresh);
         Laya.timer.frameLoop(2,this,this.CheckHeight);