Falling sound verzögert
This commit is contained in:
parent
ba6e8cd54e
commit
d8bbb48ccb
@ -12,6 +12,7 @@ public class FallingDetection : MonoBehaviour
|
||||
public AudioClip landeSound; // The sound clip to be played
|
||||
public AudioClip sprungSound; // The sound clip to be played
|
||||
public bool isJumping = false;
|
||||
private int counterFall = 0;
|
||||
|
||||
|
||||
private void Start()
|
||||
@ -40,11 +41,13 @@ public class FallingDetection : MonoBehaviour
|
||||
isFalling = true;
|
||||
animator.SetBool("IsFalling", true);
|
||||
counter = 0;
|
||||
wasFallingbefore = true;
|
||||
if(counterFall++>180){
|
||||
wasFallingbefore = true;}
|
||||
}
|
||||
} else {
|
||||
isFalling = false;
|
||||
counter = 0;
|
||||
counterFall=0;
|
||||
animator.SetBool("IsFalling", false);
|
||||
if(wasFallingbefore){
|
||||
wasFallingbefore = false;
|
||||
|
198
Assets/Scenes/ScenesInGame/4DScene.unity
generated
198
Assets/Scenes/ScenesInGame/4DScene.unity
generated
@ -986,6 +986,7 @@ MonoBehaviour:
|
||||
activatedSprite: {fileID: 21300000, guid: dc19b5a3b36f9fe4fb4798db8a0ca25c, type: 3}
|
||||
startActivated: 0
|
||||
dreiAn: 0
|
||||
pressedSound: {fileID: 8300000, guid: caef5564ce6229347a94243ed1a4ec72, type: 3}
|
||||
--- !u!212 &321396287 stripped
|
||||
SpriteRenderer:
|
||||
m_CorrespondingSourceObject: {fileID: 3743697183328372274, guid: 703dddc0b1ed3464298fa5e1c7c25cf4, type: 3}
|
||||
@ -1388,6 +1389,102 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3743697183328372275, guid: 703dddc0b1ed3464298fa5e1c7c25cf4, type: 3}
|
||||
m_PrefabInstance: {fileID: 576363002}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!82 &576363004
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 321396278}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &629579775
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2943,11 +3040,108 @@ MonoBehaviour:
|
||||
activatedSprite: {fileID: 21300000, guid: dc19b5a3b36f9fe4fb4798db8a0ca25c, type: 3}
|
||||
startActivated: 0
|
||||
zweiAn: 0
|
||||
pressedSound: {fileID: 8300000, guid: caef5564ce6229347a94243ed1a4ec72, type: 3}
|
||||
--- !u!212 &1025485198 stripped
|
||||
SpriteRenderer:
|
||||
m_CorrespondingSourceObject: {fileID: 3743697183328372274, guid: 703dddc0b1ed3464298fa5e1c7c25cf4, type: 3}
|
||||
m_PrefabInstance: {fileID: 6557371}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!82 &1025485199
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1025485189}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_PlayOnAwake: 0
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1001 &1026954269
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3762,6 +3956,7 @@ MonoBehaviour:
|
||||
_LevelManager1: {fileID: 1583986083}
|
||||
_LevelManager2: {fileID: 1025485189}
|
||||
_LevelManager3: {fileID: 321396278}
|
||||
keyAppearSound: {fileID: 8300000, guid: 296661cafd6e09248a158aa058080750, type: 3}
|
||||
isActivated: 0
|
||||
--- !u!114 &1583986086
|
||||
MonoBehaviour:
|
||||
@ -3782,6 +3977,7 @@ MonoBehaviour:
|
||||
activatedPointPosition: {x: 1.15, y: 2, z: 0}
|
||||
einsAn: 0
|
||||
_LevelManager1: {fileID: 1583986083}
|
||||
pressedSound: {fileID: 8300000, guid: 4d73df53fe172084abe41ff9683bb08e, type: 3}
|
||||
--- !u!212 &1583986090 stripped
|
||||
SpriteRenderer:
|
||||
m_CorrespondingSourceObject: {fileID: 6694380534905033865, guid: 165a2208b0162fc41bc09f4b688b8750, type: 3}
|
||||
@ -20061,6 +20257,7 @@ MonoBehaviour:
|
||||
activatedPointPosition: {x: 1.15, y: 2, z: 0}
|
||||
einsAn: 0
|
||||
_LevelManager1: {fileID: 1954130082}
|
||||
pressedSound: {fileID: 0}
|
||||
--- !u!114 &1954130092
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -20077,6 +20274,7 @@ MonoBehaviour:
|
||||
_LevelManager1: {fileID: 1954130082}
|
||||
_LevelManager2: {fileID: 1025485189}
|
||||
_LevelManager3: {fileID: 321396278}
|
||||
keyAppearSound: {fileID: 0}
|
||||
isActivated: 0
|
||||
--- !u!1001 &2011257467
|
||||
PrefabInstance:
|
||||
|
Loading…
x
Reference in New Issue
Block a user