mirror of
https://github.com/frizbee19/FebGameJam.git
synced 2026-09-11 08:17:01 +00:00
Aquaphobia spirits
This commit is contained in:
11 files changed
+1332
-33
No files matched your search
@@ -9,6 +9,8 @@ public class Movement : MonoBehaviour
|
||||
[Range(0, 1)][SerializeField] private float m_CrouchSpeed = .36f; // Amount of maxSpeed applied to crouching movement. 1 = 100%
|
||||
[Range(0, .3f)][SerializeField] private float m_MovementSmoothing = .05f; // How much to smooth out the movement
|
||||
[SerializeField] private bool m_AirControl = false; // Whether or not a player can steer while jumping;
|
||||
/** @MindfulMinun -- This is for the water level, if the player is swimming just let them double jump as many times as they want. */
|
||||
[SerializeField] private bool swimming = false; // Whether or not a player the player is in a swimming level
|
||||
[SerializeField] private LayerMask m_WhatIsGround; // A mask determining what is ground to the character
|
||||
[SerializeField] private Transform m_GroundCheck; // A position marking where to check if the player is grounded.
|
||||
[SerializeField] private Transform m_CeilingCheck; // A position marking where to check for ceilings
|
||||
@@ -138,7 +140,7 @@ public class Movement : MonoBehaviour
|
||||
m_Grounded = false;
|
||||
m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce));
|
||||
dj = false;
|
||||
}else if (jump && dj == false){
|
||||
}else if (jump && (dj == false || swimming == true)){
|
||||
m_Grounded = false;
|
||||
m_Rigidbody2D.AddForce(new Vector2(0f, m_JumpForce));
|
||||
dj = true;
|
||||
|
||||
Reference in new issue
Block a user