Browse Source

日常开发

林旭祥 2 days ago
parent
commit
4ce7324eb0
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/views/game/fruit.vue

+ 4 - 3
src/views/game/fruit.vue

@@ -177,7 +177,7 @@ const mathTool = {
 
   randomVelocityY() {
     const myH = height - 480;
-    return this.randomMinMax(-1000 - myH, -950 - myH);
+    return this.randomMinMax(-900 - myH, -850 - myH);
   },
 
   degCos(deg) {
@@ -564,6 +564,7 @@ class Blade {
     });
     // 监听鼠标移动事件(可选,也可在update中处理)
     this.game.input.on('pointermove', (pointer) => {
+      console.log("11111",pointer)
       if (this.allowBlade) {
         this.handleMouseMove(pointer);
       }
@@ -928,7 +929,7 @@ class PlayScene extends Phaser.Scene {
     this.x = null;
     this.xx = null;
     this.xxx = null;
-    this.gravity = 1000;
+    this.gravity = 600;
   }
 
   create() {
@@ -1104,7 +1105,7 @@ class PlayScene extends Phaser.Scene {
   startFruit() {
 
     const number = Math.floor(mathTool.randomMinMax(1, 5));
-    const hasBomb = Math.random() > 0.3; // 30%概率有炸弹
+    const hasBomb = Math.random() > 0.7; // 炸弹概率
     const bombIndex = hasBomb ? Math.floor(Math.random() * number) : -1;
 
     for (let i = 0; i < number; i++) {