Browse Source

日常开发

林旭祥 2 days ago
parent
commit
fa14e5bb0b
1 changed files with 8 additions and 6 deletions
  1. 8 6
      src/views/game/fruit.vue

+ 8 - 6
src/views/game/fruit.vue

@@ -798,10 +798,11 @@ class MainScene extends Phaser.Scene {
     //创建组合默认先隐藏
     this.homeGroup = this.add.container(0, -height);
     //背景蒙版
-    this.home_mask = this.add.image(0, 0, "home-mask");
-    this.home_mask.setOrigin(0, 0);
-    this.home_mask.setScale(wRatio);
-    this.home_mask.y = -200;
+    // this.home_mask = this.add.image(0, 0, "home-mask");
+    // this.home_mask.setOrigin(0, 0);
+    // this.home_mask.setScale(wRatio);
+    // this.home_mask.y = -200;
+    
     //logo
     this.logo = this.add.image(20, 50, "logo");
     this.logo.setOrigin(0, 0);
@@ -809,7 +810,8 @@ class MainScene extends Phaser.Scene {
     this.home_desc = this.add.image(0, 0, "home-desc");
     this.home_desc.setPosition((width - this.home_desc.width / 2) - 20, 70);
     //合并图层
-    this.homeGroup.add([this.home_mask, this.logo, this.home_desc]);
+    //this.homeGroup.add([this.home_mask, this.logo, this.home_desc]);
+    this.homeGroup.add([this.logo, this.home_desc]);
     // 退出按钮
     this.lose = this.add.image(0, 0, "lose");
     this.lose.setPosition(width - this.lose.width - 30, height - this.lose.height - 30);
@@ -1104,7 +1106,7 @@ class PlayScene extends Phaser.Scene {
 
   startFruit() {
 
-    const number = Math.floor(mathTool.randomMinMax(1, 5));
+    const number = Math.floor(mathTool.randomMinMax(1, 3));
     const hasBomb = Math.random() > 0.9; // 炸弹概率
     const bombIndex = hasBomb ? Math.floor(Math.random() * number) : -1;