This commit is contained in:
2020-02-02 16:45:37 -05:00
9 changed files with 690 additions and 166 deletions

View File

@@ -79,6 +79,7 @@ public class GameIntroCutscene : Cutscene
yield return new WaitForSeconds(.8f);
sceneC.sprite = sprites[3];
SoundManagerScript.PlaySound("slam");
Shake(15);
yield return new WaitForSeconds(1f);
@@ -120,6 +121,7 @@ public class GameIntroCutscene : Cutscene
sceneC.sprite = sprites[2];
sceneB.sprite = sprites[6];
SoundManagerScript.PlaySound("slam");
Shake(20);
yield return new WaitForSeconds(1.5f);

View File

@@ -53,28 +53,6 @@ public class Player : MonoBehaviour
private void Update()
{
MovePlayer();
//if (IsPlayerOnWall(true))
//{
// if (collider.sharedMaterial == null || collider.sharedMaterial.friction != 0f)
// {
// collider.sharedMaterial = new PhysicsMaterial2D();
// collider.sharedMaterial.friction = 0f;
// collider.enabled = false;
// collider.enabled = true;
// }
//}
//else
//{
// if (collider.sharedMaterial == null || collider.sharedMaterial.friction == 0f)
// {
// collider.sharedMaterial = new PhysicsMaterial2D();
// collider.sharedMaterial.friction = 0.5f;
// collider.enabled = false;
// collider.enabled = true;
// }
//}
}
public void OnConsumable(Collider2D collision)

View File

@@ -7,7 +7,7 @@ public class SoundManagerScript : MonoBehaviour
public static AudioClip jumpSound, screamSound, wrongButtonSound,
bugLaughSound, drinkSound, eatSound, punchSound, hardPunchSound,
slapSound, hardSlapSound, winSound;
slapSound, hardSlapSound, winSound, slamSound;
public static AudioSource audioSrc;
// Start is called before the first frame update
@@ -24,6 +24,7 @@ public class SoundManagerScript : MonoBehaviour
slapSound = Resources.Load<AudioClip>("Audio/Slap");
hardSlapSound = Resources.Load<AudioClip>("Audio/HardSlap");
winSound = Resources.Load<AudioClip>("Audio/Win");
slamSound = Resources.Load<AudioClip>("Audio/Slam");
audioSrc = GetComponent<AudioSource>();
}
@@ -72,6 +73,9 @@ public class SoundManagerScript : MonoBehaviour
case "win":
sound = winSound;
break;
case "slam":
sound = slamSound;
break;
}