Falling sound verzögert
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user