diff --git a/Assets/Scripts/CameraMovement.cs b/Assets/Scripts/CameraMovement.cs index 8b8b309..ca8d78d 100644 --- a/Assets/Scripts/CameraMovement.cs +++ b/Assets/Scripts/CameraMovement.cs @@ -45,8 +45,5 @@ public class CameraMovement : MonoBehaviour { public void FindPlayer() { player = GameObject.FindGameObjectWithTag("Player"); - // if (player == null) { - // print("null player!"); - // } } } diff --git a/Assets/Scripts/DebugSceneSwitcher.cs b/Assets/Scripts/DebugSceneSwitcher.cs index b09ef57..e14ddee 100644 --- a/Assets/Scripts/DebugSceneSwitcher.cs +++ b/Assets/Scripts/DebugSceneSwitcher.cs @@ -33,7 +33,6 @@ public class DebugSceneSwitcher : MonoBehaviour for (int i = 0; i < SceneManager.sceneCountInBuildSettings; i++) { string newName = System.IO.Path.GetFileNameWithoutExtension(SceneUtility.GetScenePathByBuildIndex(i)); - print(newName); sceneNames.Add(newName); } sceneDropdown.AddOptions(sceneNames); @@ -45,7 +44,6 @@ public class DebugSceneSwitcher : MonoBehaviour public void ChangeScene(int index) { - // print(index); SceneController.Instance.LoadChosenScene(index); this.gameObject.SetActive(false); } diff --git a/Assets/Scripts/DialogBoxes.cs b/Assets/Scripts/DialogBoxes.cs index bcd9938..9713490 100644 --- a/Assets/Scripts/DialogBoxes.cs +++ b/Assets/Scripts/DialogBoxes.cs @@ -26,7 +26,6 @@ public class DialogBoxes : MonoBehaviour { textField = this.gameObject.GetComponent(); ReconfigureSpriteArray(); - print("reconfigured"); textField.text = dialogMessages[0]; backgroundImageObject.sprite = images[0]; } @@ -36,8 +35,6 @@ public class DialogBoxes : MonoBehaviour messageCount += 1; if (messageCount < dialogMessages.Length) { - print("looking at message " + messageCount); - print("messages: " + dialogMessages.Length + ", images: " + images.Length); textField.text = dialogMessages[messageCount]; backgroundImageObject.sprite = images[messageCount]; } @@ -53,11 +50,9 @@ public class DialogBoxes : MonoBehaviour void ReconfigureSpriteArray() { - print("attempting to reconfigure"); // resize if need to if (images.Length != dialogMessages.Length) { - print("resizing"); Sprite[] newImagesArray = new Sprite[dialogMessages.Length]; for (int i = 0; i < newImagesArray.Length; i++) { @@ -78,7 +73,6 @@ public class DialogBoxes : MonoBehaviour images[i] = images[i - 1]; } } - print(images.Length); } } diff --git a/Assets/Scripts/EnemyPatrol.cs b/Assets/Scripts/EnemyPatrol.cs index 055f76d..ad091cc 100644 --- a/Assets/Scripts/EnemyPatrol.cs +++ b/Assets/Scripts/EnemyPatrol.cs @@ -86,11 +86,8 @@ public class EnemyPatrol : MonoBehaviour { this.gameObject.GetComponent().enabled = false; animator.Play("Explosion"); float explosionTime = .25f; - // print("explosiontime: " + explosionTime); this.gameObject.GetComponent().Play(); - // print("reached early point"); yield return new WaitForSeconds(explosionTime); - // print("reached late point"); this.gameObject.GetComponent().enabled = true; isPlayingDefeatAnimation = false; this.gameObject.SetActive(false); diff --git a/Assets/Scripts/PlayerBehavior.cs b/Assets/Scripts/PlayerBehavior.cs index c1af501..cd48bd8 100644 --- a/Assets/Scripts/PlayerBehavior.cs +++ b/Assets/Scripts/PlayerBehavior.cs @@ -24,7 +24,6 @@ public class PlayerBehavior : MonoBehaviour private bool isDash = false; public float dashForce = 1f; public float dashTime = 1.0f; - private float dashInc = 0.1f; private float currentDash = 0.0f; private bool forceAdded = false; Vector2 dashVec; @@ -146,9 +145,6 @@ public class PlayerBehavior : MonoBehaviour if (this.playerInput.actions["CymbalCrash"].WasPressedThisFrame()) { // Play the sound this.gameUI.ToggleCymbal(false); - // this.audioSource.clip = cymbalSound; - // this.audioSource.loop = false; - // this.audioSource.Play(); cymbalAudio.Play(); // Set the cymbal active for the equivalent of one second @@ -226,7 +222,6 @@ public class PlayerBehavior : MonoBehaviour void LetGoOfGrapple() { bool currentlyPaused = StateController.Instance.isPaused; if (grapplingRope.isGrappling && !currentlyPaused) { - // print("currently paused is " + currentlyPaused + ", releasing grapple"); if (tambourine != null) { tambourine.GetComponent().DestroySelf(); } @@ -241,7 +236,6 @@ public class PlayerBehavior : MonoBehaviour } else { reflect = new Vector2(saveVelocity.x * reflectForce, -(saveVelocity.y) * reflectForce); - //reflect = new Vector2(saveVelocity.x * 1.1f, -(saveVelocity.y) * reflectForce); hasBounced = true; } _rb.AddForce(reflect, ForceMode2D.Impulse); @@ -250,7 +244,6 @@ public class PlayerBehavior : MonoBehaviour } void Water() { - print("water dash " + isDash); if(isDash) { saveVelocity = _rb.velocity / velocityCut; if (isDash) { @@ -268,7 +261,6 @@ public class PlayerBehavior : MonoBehaviour grappleSurface = col.gameObject; } else if (col.tag == "instaDeath") { - print("player fell in spikes"); StartCoroutine(DestroyPlayer()); } else if (col.tag == "spawnPoint") { @@ -331,7 +323,6 @@ public class PlayerBehavior : MonoBehaviour } else { StartCoroutine(DestroyPlayer()); - print("enemy defeated player"); } } else if (collision.gameObject.tag == "Projectile") { @@ -365,7 +356,6 @@ public class PlayerBehavior : MonoBehaviour if (grapplingRope.isGrappling) { LetGoOfGrapple(); } - // print("destroyPlayer called"); playerIsAlive = false; audioSource.clip = deathSound; audioSource.loop = false; @@ -378,14 +368,10 @@ public class PlayerBehavior : MonoBehaviour // destroy all tambourines GameObject[] currentTambourines = GameObject.FindGameObjectsWithTag("tambourine"); - print("tambs found: " + currentTambourines.Length); if (currentTambourines != null) { foreach (GameObject tambourine in currentTambourines) { if (tambourine != null) { tambourine.GetComponent().DestroySelf(); - print("tamb destroyed"); - } else { - print("null tamb"); } } } diff --git a/Assets/Scripts/PlayerController.cs b/Assets/Scripts/PlayerController.cs index d84696d..64574a2 100644 --- a/Assets/Scripts/PlayerController.cs +++ b/Assets/Scripts/PlayerController.cs @@ -125,7 +125,6 @@ public class PlayerMovement : MonoBehaviour isRegFalling = false; } else { - // print("not jumping"); if (!_isJumpFalling && !isRegFalling) { if (unlockedTrumpet) { trumpet = 1; @@ -143,7 +142,6 @@ public class PlayerMovement : MonoBehaviour #region JUMP CHECKS if (IsJumping && RB.velocity.y <= 0) { IsJumping = false; - // print("isJumping " + IsJumping); _isJumpFalling = true; } @@ -162,7 +160,6 @@ public class PlayerMovement : MonoBehaviour _isJumpFalling = false; bool inCoyoteTime = LastOnGroundTime > 0; - //print("coyote time: " + inCoyoteTime); Jump(); @@ -186,7 +183,6 @@ public class PlayerMovement : MonoBehaviour // stop sound if needed if (soundPlaying && (isRegFalling || IsJumping || _isJumpFalling)) { - print("footsteps stop"); audioSource.Stop(); soundPlaying = false; } @@ -201,10 +197,6 @@ public class PlayerMovement : MonoBehaviour #region GRAVITY //Higher gravity if we've released the jump input or are falling - // if (IsSliding) - // { - // SetGravityScale(0); - // } if (RB.velocity.y < 0 && _moveInput.y < 0) { //Much higher gravity if holding down SetGravityScale(Data.gravityScale * Data.fastFallGravityMult); @@ -234,13 +226,11 @@ public class PlayerMovement : MonoBehaviour #region SOUND CHECKS if (!IsJumping && !_isJumpFalling && !isRegFalling && _moveInput.x != 0) { if (!soundPlaying) { - // print("footsteps PLAY"); audioSource.Play(); soundPlaying = true; } } else if (soundPlaying && audioSource.clip.name == "footsteps") { - // print("footsteps stop"); audioSource.Stop(); soundPlaying = false; } @@ -375,7 +365,6 @@ public class PlayerMovement : MonoBehaviour } public bool IsGrounded() { - // print(Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping); return (Physics2D.OverlapBox(new Vector2(this.transform.position.x, this.transform.position.y - _groundCheckOffset), _groundCheckSize, 0, _groundLayer) && !IsJumping); } diff --git a/Assets/Scripts/PlayerData.cs b/Assets/Scripts/PlayerData.cs index 0fc540b..22e7fa8 100644 --- a/Assets/Scripts/PlayerData.cs +++ b/Assets/Scripts/PlayerData.cs @@ -44,19 +44,8 @@ public class PlayerData : ScriptableObject public float jumpHangAccelerationMult; public float jumpHangMaxSpeedMult; - [Header("Wall Jump")] - public Vector2 wallJumpForce; //The actual force (this time set by us) applied to the player when wall jumping. - [Space(5)] - [Range(0f, 1f)] public float wallJumpRunLerp; //Reduces the effect of player's movement while wall jumping. - [Range(0f, 1.5f)] public float wallJumpTime; //Time after wall jumping the player's movement is slowed for. - public bool doTurnOnWallJump; //Player will rotate to face wall jumping direction - [Space(20)] - [Header("Slide")] - public float slideSpeed; - public float slideAccel; - [Header("Assists")] [Range(0.01f, 0.5f)] public float coyoteTime; //Grace period after falling off a platform, where you can still jump [Range(0.01f, 0.5f)] public float jumpInputBufferTime; //Grace period after pressing jump where a jump will be automatically performed once the requirements (eg. being grounded) are met. diff --git a/Assets/Scripts/SceneController.cs b/Assets/Scripts/SceneController.cs index a32615c..9f98fc4 100644 --- a/Assets/Scripts/SceneController.cs +++ b/Assets/Scripts/SceneController.cs @@ -29,11 +29,6 @@ public class SceneController : MonoBehaviour void OnSceneLoaded(Scene scene, LoadSceneMode mode) { GameObject pauseMenu = GameObject.Find("PauseMenuCanvas"); - if (pauseMenu != null) - { - // Button quitButton = GameObject.Find("QuitButton").GetComponent