xx 1 年之前
父節點
當前提交
b4b09b70dc

文件差異過大導致無法顯示
+ 107 - 0
assets/resources/effect/particle/weiqi/smoke.plist


+ 70 - 0
assets/resources/effect/particle/weiqi/smoke.plist.meta

@@ -0,0 +1,70 @@
+{
+  "ver": "1.0.2",
+  "importer": "particle",
+  "imported": true,
+  "uuid": "05248e9a-1166-472e-b869-b344ea638116",
+  "files": [
+    ".json",
+    ".plist"
+  ],
+  "subMetas": {},
+  "userData": {
+    "totalParticles": 20,
+    "life": 0.64,
+    "lifeVar": 0,
+    "emissionRate": 31.25,
+    "duration": -1,
+    "srcBlendFactor": 770,
+    "dstBlendFactor": 771,
+    "startColor": {
+      "_val": 4294967295
+    },
+    "startColorVar": {
+      "_val": 0
+    },
+    "endColor": {
+      "_val": 5662310
+    },
+    "endColorVar": {
+      "_val": 4278190080
+    },
+    "startSize": 39,
+    "startSizeVar": 30,
+    "endSize": 185,
+    "endSizeVar": 0,
+    "positionType": 0,
+    "sourcePos": {
+      "x": 0,
+      "y": 0
+    },
+    "posVar": {
+      "x": 15,
+      "y": 45
+    },
+    "angle": 90,
+    "angleVar": 10,
+    "startSpin": -12,
+    "startSpinVar": 0,
+    "endSpin": 0,
+    "endSpinVar": 0,
+    "emitterMode": 0,
+    "gravity": {
+      "x": 173,
+      "y": -51
+    },
+    "speed": 250,
+    "speedVar": 5,
+    "radialAccel": 0,
+    "radialAccelVar": 0,
+    "tangentialAccel": 0,
+    "tangentialAccelVar": 0,
+    "rotationIsDir": false,
+    "startRadius": 0,
+    "startRadiusVar": 0,
+    "endRadius": 0,
+    "endRadiusVar": 0,
+    "rotatePerS": 0,
+    "rotatePerSVar": 0,
+    "spriteFrameUuid": ""
+  }
+}

文件差異過大導致無法顯示
+ 566 - 156
assets/resources/prefabs/game.prefab


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

@@ -1,4 +1,4 @@
-import { _decorator, BoxCollider2D, CircleCollider2D, Collider2D, Component, Contact2DType, Director, director, IPhysics2DContact, Label, math, Node, PolygonCollider2D, Rect, RigidBody, RigidBody2D, Sprite, tween, Tween, UITransform, Vec2, Vec3, View } from 'cc';
+import { _decorator, BoxCollider2D, CircleCollider2D, Collider2D, Component, Contact2DType, Director, director, IPhysics2DContact, Label, math, Node, ParticleSystem2D, PolygonCollider2D, Rect, RigidBody, RigidBody2D, Sprite, tween, Tween, UITransform, Vec2, Vec3, View } from 'cc';
 import { wall } from './wall';
 import { box } from './box';
 import { coin } from './coin';
@@ -45,6 +45,7 @@ export class car extends Component {
     private isStartGame:Boolean = false
     @property(Node) spr:Node = null
     @property(Node) hp_bar:Node = null
+    @property(ParticleSystem2D) smoke_particle:ParticleSystem2D = null
     private mIsReLife:boolean = false
     public init(m:Node,cb,cb1,g:game,isReLife:boolean = false){
         this.mIsReLife = isReLife
@@ -321,8 +322,10 @@ export class car extends Component {
     }
     public startGame(){
         this.isStartGame = true
+        this.smoke_particle.node.active = true
     }
     public stopGame(){
+        this.smoke_particle.node.active = false
         this.isStartGame = false
     }
     check(){
@@ -426,6 +429,11 @@ export class car extends Component {
         this.speed_bei = dis / 7
         if(this.speed_bei>5){
             dis*=3
+            Tween.stopAllByTarget(this.smoke_particle.node)
+            tween(this.smoke_particle.node).delay(2).call(()=>{
+                this.smoke_particle.stopSystem()
+            }).start()
+            this.smoke_particle.resetSystem()
             if(userDataManager.user_car_list.default_car_id==1){
                 audioManager.Instance().playSound(config.AUDIO.zi_xing_che_sha_che)
             }else{

部分文件因文件數量過多而無法顯示