xx há 1 ano atrás
pai
commit
c018999747
2 ficheiros alterados com 15 adições e 15 exclusões
  1. 1 1
      assets/script/game/game.ts
  2. 14 14
      assets/script/game/pool.ts

+ 1 - 1
assets/script/game/game.ts

@@ -80,7 +80,7 @@ export class game extends Component {
         this.mIndex = 2;
         this.schedule(()=>{
             if(this.node.active){
-                if(this.content.children.length<=5){
+                if(this.content.children.length<=6){
                     this.mIndex++;
                     if(this.mIndex>=tools.levels.length){
                         this.mIndex = 1;

+ 14 - 14
assets/script/game/pool.ts

@@ -28,20 +28,20 @@ export class pool extends Component {
                 this.wall_pool.put(instantiate(this.wall_pf));
             }
 
-            this.schedule(()=>{
-                if(this.box_pool.size()<this.pool_num){
-                    let box = instantiate(this.box_pf);
-                    this.box_pool.put(box);
-                }
-                if(this.coin_pool.size()<this.pool_num){
-                    const coin = instantiate(this.coin_pf);
-                    this.coin_pool.put(coin);
-                }
-                if(this.wall_pool.size()<this.pool_num){
-                    const wall = instantiate(this.wall_pf);
-                    this.wall_pool.put(wall);
-                }
-            },0.5)
+            // this.schedule(()=>{
+            //     if(this.box_pool.size()<this.pool_num){
+            //         let box = instantiate(this.box_pf);
+            //         this.box_pool.put(box);
+            //     }
+            //     if(this.coin_pool.size()<this.pool_num){
+            //         const coin = instantiate(this.coin_pf);
+            //         this.coin_pool.put(coin);
+            //     }
+            //     if(this.wall_pool.size()<this.pool_num){
+            //         const wall = instantiate(this.wall_pf);
+            //         this.wall_pool.put(wall);
+            //     }
+            // },0.5)
         }
     }