Skip to content

Commit

Permalink
music + movement improv
Browse files Browse the repository at this point in the history
  • Loading branch information
armaanbadhan committed May 29, 2021
1 parent 9b0f06d commit 6eb8dbe
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 35 deletions.
15 changes: 9 additions & 6 deletions MainMenu/ContentScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down
16 changes: 16 additions & 0 deletions MainMenu/MainMenuManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<ButtonScript>();
_content = GameObject.Find("ContentManager").GetComponent<ContentScript>();
_music = GameObject.Find("Music").GetComponent<AudioSource>();

_buttons.ShowAllHideEscape();
}
Expand All @@ -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");
}

Expand Down
2 changes: 1 addition & 1 deletion Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 11 additions & 0 deletions TooMuchMusicTheseDays.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TooMuchMusicTheseDays : MonoBehaviour
{
private void Awake()
{
DontDestroyOnLoad(this.gameObject);
}
}
2 changes: 1 addition & 1 deletion ZoneFive/DialogueZoneFive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
}

Expand Down
4 changes: 2 additions & 2 deletions ZoneOne/DialogueZoneOne.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
26 changes: 13 additions & 13 deletions ZoneOne/PlayerZoneOne.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Player>();
_DialogueManager = GameObject.Find("DialogueZ1").GetComponent<DialogueZoneOne>();
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)
Expand Down Expand Up @@ -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;
Expand Down
23 changes: 11 additions & 12 deletions ZoneTwo/PlayerZoneTwo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,26 @@ public class PlayerZoneTwo : MonoBehaviour
private DialogueZoneTwo _DialogueManager;

private bool _wizardHint = false;
private bool _initialMovement = false;

private void Start()
{
_player = GetComponent<Player>();
_DialogueManager = GameObject.Find("MyDialogueManagerZ2").GetComponent<DialogueZoneTwo>();
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)
{
Expand All @@ -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;
Expand Down

0 comments on commit 6eb8dbe

Please sign in to comment.