xx 1 tahun lalu
induk
melakukan
d9a2c327bc

+ 2 - 5
assets/resources/prefabs/game.prefab

@@ -2130,7 +2130,7 @@
         "__id__": 134
       }
     ],
-    "_active": false,
+    "_active": true,
     "_components": [
       {
         "__id__": 154
@@ -6807,10 +6807,7 @@
       "b": 255,
       "a": 255
     },
-    "_spriteFrame": {
-      "__uuid__": "fb01e5ba-adfe-4a6c-b15a-27db2a4f26bd@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_fillType": 0,
     "_sizeMode": 1,

+ 4 - 0
assets/script/game/car.ts

@@ -125,6 +125,10 @@ export class car extends Component {
         this.schedule(this.addSpeed.bind(this),tools.game_config.car_add_speed_time)
     }
 
+    public hideEffect(){
+        this.spr.getComponent(buff_manager).init()
+    }
+
     addSpeed(){
         let speed = this.move_speed_y.valueOf()+(tools.game_config.car_add_speed_num)
         if(speed<tools.game_config.car_add_speed_max){

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

@@ -103,6 +103,7 @@ export class game extends Component {
     onOver(){
         this.unscheduleAllCallbacks()
         this.count_time.active = false
+        this.car.getComponent(car).hideEffect()
         director.once(Director.EVENT_AFTER_DRAW,()=>{
             this.removeAll()
             this.results_view.getComponent(results).show(this.car.getComponent(car).getScores(),(isReLife:boolean=false)=>{