This commit is contained in:
GamerClassN7
2021-01-31 14:22:06 +01:00
parent 8119ff8620
commit dc894c90b9
9 changed files with 103 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ public class AudioManager : MonoBehaviour
if (s == null) {
return;
}
Debug.Log("Sound is playng");
s.source.Play();
}
}

View File

@@ -73,6 +73,7 @@ public class PlayerManager : MonoBehaviour
{
cannotMove = true;
playerAnimator.Play("Die");
FindObjectOfType<AudioManager>().Play("lose");
}
if (interact)
{
@@ -85,6 +86,7 @@ public class PlayerManager : MonoBehaviour
)) {
if (Input.GetKeyUp(KeyCode.E))
{
FindObjectOfType<AudioManager>().Play("Pickup");
playerAnimator.SetTrigger("Eat");
interact = false;
}
@@ -117,6 +119,7 @@ public class PlayerManager : MonoBehaviour
if (!cannotMove && !onLadder)
{
Jump();
FindObjectOfType<AudioManager>().Play("Jump");
}
}
@@ -227,6 +230,7 @@ public class PlayerManager : MonoBehaviour
if (Input.GetAxisRaw("Run") > 0)
{
run = true;
}
else
{
@@ -363,6 +367,7 @@ public class PlayerManager : MonoBehaviour
speed += power;
runSpeed += power;
FindObjectOfType<AudioManager>().Play("Jump");
}
else if (powerType == PowerCubeManager.PowerType.Jumper)
{