File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
CrazyCar/Assets/Scripts/Game Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ void Update() {
86
86
}
87
87
}
88
88
// 不能放在FixedUpdate 加速时间太短
89
- ShowScreenEffect ( ) ;
89
+ ShowVFX ( ) ;
90
90
}
91
91
92
92
public void ConfirmStatus ( PlayerStateMsg playerStateMsg ) {
@@ -121,10 +121,11 @@ private void FixedUpdate() {
121
121
}
122
122
}
123
123
124
- private void ShowScreenEffect ( ) {
124
+ private void ShowVFX ( ) {
125
125
if ( leftTrail . enabled == true ) {
126
126
EnableScreenEffect ( ) ;
127
127
PlayDriftParticle ( ) ;
128
+ this . GetSystem < ISoundSystem > ( ) . PlayWheelEngineSound ( ) ;
128
129
} else {
129
130
DisableScreenEffect ( ) ;
130
131
StopDriftParticle ( ) ;
@@ -287,13 +288,13 @@ private void Boost(float boostForce) {
287
288
EnableTrail ( ) ;
288
289
}
289
290
291
+ #region VFX
290
292
private void PlayDriftParticle ( ) {
291
293
foreach ( var tempParticle in wheelsParticeles ) {
292
294
tempParticle . Play ( ) ;
293
295
}
294
296
plexusVFX . gameObject . SetActiveFast ( true ) ;
295
- wireframeVFX . SetActiveFast ( true ) ;
296
- this . GetSystem < ISoundSystem > ( ) . PlayWheelEngineSound ( ) ;
297
+ wireframeVFX . SetActiveFast ( true ) ;
297
298
}
298
299
299
300
private void StopDriftParticle ( ) {
@@ -323,6 +324,7 @@ private void DisableScreenEffect() {
323
324
screenEffectTime = 0 ;
324
325
this . GetSystem < IScreenEffectsSystem > ( ) . SetMotionBlur ( screenEffectTime ) ;
325
326
}
327
+ #endregion
326
328
327
329
private void ChangeDriftColor ( ) {
328
330
foreach ( var tempParticle in wheelsParticeles ) {
You can’t perform that action at this time.
0 commit comments