Browse Source

日常开发

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

+ 2 - 1
src/views/game/fruit.vue

@@ -369,6 +369,7 @@ class Fruit {
 
     // 粒子发射器
     this.emitter = this.game.add.particles(0, 0, 'flameParticle', {
+      visible: false // 初始隐藏
     });
   }
 
@@ -778,7 +779,7 @@ class MainScene extends Phaser.Scene {
     // 每次创建全新的容器,避免复用旧实例
     this.sandiaGroup = this.add.container(0, 0); // 先置0,后续重新计算
     // 西瓜组初始位置:基于当前窗口尺寸动态计算(核心修复)
-    this.sandiaGroup.setPosition(width / 2,height / 2); // 强制设置位置
+    this.sandiaGroup.setPosition(width / 2, height / 2); // 强制设置位置
     //圆圈
     this.new_game = this.add.sprite(0, 0, "new-game");
     this.new_game.setOrigin(0.5, 0.5);