diff --git a/MainMenu/ContentScript.cs b/MainMenu/ContentScript.cs index 63757a4..b840afc 100644 --- a/MainMenu/ContentScript.cs +++ b/MainMenu/ContentScript.cs @@ -13,17 +13,20 @@ public class ContentScript : MonoBehaviour public void ShowCredits() { - _text.text = "Made By:\n" + - "* Armaan\n" + - "* Rijul\n" + - "* Manjot\n" + - "* Munish?"; + _text.text = "Game development: Armaan Badhan\n" + + "Pixel Art, story: Rijul Singla\n" + + "Music used: 'VGMA-Challenge-July-13th'\n" + + " 'Ludun-Dare-28 Track 3'\n" + + " http://abstractionmusic.com/ \n" + + "Some pixel art assests from:\n" + + " https://itch.io/game-assets \n" + + "Special Thanks: Manjot Singh Oberoi, Munish Kumar"; } public void ShowAbout() { - _text.text = "little chad wakes up and\nfinds out his little dog\ngorge is missing\n" + + _text.text = "little chad wakes up and\nfinds out his little dog\ngeorge is missing\n" + "follow him along in this\nadventure and find george"; } diff --git a/MainMenu/MainMenuManager.cs b/MainMenu/MainMenuManager.cs index 5a7868e..87a1c5e 100644 --- a/MainMenu/MainMenuManager.cs +++ b/MainMenu/MainMenuManager.cs @@ -12,12 +12,16 @@ public class MainMenuManager : MonoBehaviour [SerializeField] private ContentScript _content; + [SerializeField] + private AudioSource _music; + private bool _isEscapeActive = false; private void Start() { _buttons = GameObject.Find("ButtonsManager").GetComponent(); _content = GameObject.Find("ContentManager").GetComponent(); + _music = GameObject.Find("Music").GetComponent(); _buttons.ShowAllHideEscape(); } @@ -36,6 +40,18 @@ public void ClickStart() { _content.HideContent(); _buttons.HideAllButtons(); + StartCoroutine(FadeMusic()); + } + + IEnumerator FadeMusic() + { + float startVolume = _music.volume; + + while (_music.volume > 0) + { + _music.volume -= startVolume * Time.deltaTime / 0.1f; + yield return null; + } SceneManager.LoadScene("MOMConvo"); } diff --git a/Player.cs b/Player.cs index 74fb2fa..be5c0a4 100644 --- a/Player.cs +++ b/Player.cs @@ -74,7 +74,7 @@ private void Movement() transform.Translate(Vector3.right * _horizontalSpeed * horizontalInput * Time.deltaTime); // jump - if (_canJump && Input.GetKeyDown(KeyCode.W)) + if (_canJump && (Input.GetKeyDown(KeyCode.W) || Input.GetKeyDown(KeyCode.UpArrow))) { _rigidBody.gravityScale = 2.75f; _canJump = false; diff --git a/TooMuchMusicTheseDays.cs b/TooMuchMusicTheseDays.cs new file mode 100644 index 0000000..1e721ea --- /dev/null +++ b/TooMuchMusicTheseDays.cs @@ -0,0 +1,11 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class TooMuchMusicTheseDays : MonoBehaviour +{ + private void Awake() + { + DontDestroyOnLoad(this.gameObject); + } +} diff --git a/ZoneFive/DialogueZoneFive.cs b/ZoneFive/DialogueZoneFive.cs index 00b717c..9b8f5a6 100644 --- a/ZoneFive/DialogueZoneFive.cs +++ b/ZoneFive/DialogueZoneFive.cs @@ -53,7 +53,7 @@ public void ShowExclamation() IEnumerator Surprised() { _hairaaHoonMein.text = "!!!"; - yield return new WaitForSeconds(1.5f); + yield return new WaitForSeconds(1.0f); _hairaaHoonMein.text = ""; } diff --git a/ZoneOne/DialogueZoneOne.cs b/ZoneOne/DialogueZoneOne.cs index 0dd3fdb..e68e79d 100644 --- a/ZoneOne/DialogueZoneOne.cs +++ b/ZoneOne/DialogueZoneOne.cs @@ -17,9 +17,9 @@ public class DialogueZoneOne : MonoBehaviour [SerializeField] private PlayerZoneOne _player; - readonly private string _convoOne = "chad (to himself): those are george's footsteps. he must be up ahead."; + readonly private string _convoOne = "you (to yourself): those are george's footsteps. he must be up ahead."; readonly private string _convoTwo = "Guard: You are not allowed in here\n" + - "Chad: I wasn’t going there anyway"; + "you: I wasn’t going there anyway"; readonly private string _convoThree = "You see Mr.Kempty’s house as you pass by. Always found that dude creepy. And what kinda name is that anyway?"; private void Start() diff --git a/ZoneOne/PlayerZoneOne.cs b/ZoneOne/PlayerZoneOne.cs index bfcb822..d4abb50 100644 --- a/ZoneOne/PlayerZoneOne.cs +++ b/ZoneOne/PlayerZoneOne.cs @@ -19,15 +19,26 @@ public class PlayerZoneOne : MonoBehaviour private bool _dogHint = false; private bool _guardHint = false; private bool _kemptyConvo = false; + private bool _initialMovement = false; private void Start() { _player = GetComponent(); _DialogueManager = GameObject.Find("DialogueZ1").GetComponent(); - StartCoroutine(InitialMovement()); } - + private void Update() + { + if (!_initialMovement && transform.position.x < -8f) + { + transform.Translate(Vector3.right * 2f * Time.deltaTime); + } + else if (!_initialMovement) + { + _initialMovement = true; + SetMovementTrue(); + } + } private void OnTriggerEnter2D(Collider2D other) @@ -59,17 +70,6 @@ private void OnTriggerEnter2D(Collider2D other) } } - - public IEnumerator InitialMovement() - { - while (transform.position.x < -8f) - { - transform.position = new Vector3(transform.position.x + 0.02f, -2.7f, 0); - yield return null; - } - SetMovementTrue(); - } - public void SetMovementTrue() { _player.playerMovement = true; diff --git a/ZoneTwo/PlayerZoneTwo.cs b/ZoneTwo/PlayerZoneTwo.cs index a072772..699b834 100644 --- a/ZoneTwo/PlayerZoneTwo.cs +++ b/ZoneTwo/PlayerZoneTwo.cs @@ -18,16 +18,26 @@ public class PlayerZoneTwo : MonoBehaviour private DialogueZoneTwo _DialogueManager; private bool _wizardHint = false; + private bool _initialMovement = false; private void Start() { _player = GetComponent(); _DialogueManager = GameObject.Find("MyDialogueManagerZ2").GetComponent(); - StartCoroutine(InitialMovement()); } private void Update() { + if (!_initialMovement && transform.position.x < -8f) + { + transform.Translate(Vector3.right * 2f * Time.deltaTime); + } + else if (!_initialMovement) + { + _initialMovement = true; + SetMovementTrue(); + } + // stairs thing if (transform.position.x > 8.15f) { @@ -53,17 +63,6 @@ private void OnTriggerEnter2D(Collider2D other) } - - public IEnumerator InitialMovement() - { - while (transform.position.x < -8f) - { - transform.position = new Vector3(transform.position.x + 0.02f, _player.floorYCord, 0); - yield return null; - } - SetMovementTrue(); - } - public void SetMovementTrue() { _player.playerMovement = true;