Commit 76f84d6b authored by 16도재형's avatar 16도재형

Little changes

parent 48177f4b
...@@ -339,8 +339,8 @@ MonoBehaviour: ...@@ -339,8 +339,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
speed: 300 speed: 300
jumpSpeed: 10 jumpSpeed: 400
doubleJumpSpeed: 10 doubleJumpSpeed: 400
groundLayer: groundLayer:
serializedVersion: 2 serializedVersion: 2
m_Bits: 256 m_Bits: 256
......
...@@ -52,11 +52,11 @@ public class PlayerController : MonoBehaviour { ...@@ -52,11 +52,11 @@ public class PlayerController : MonoBehaviour {
{ {
if (isGrounded) if (isGrounded)
{ {
vertical = jumpSpeed; vertical = jumpSpeed * Time.fixedDeltaTime;
} }
else if (isJumpable) else if (isJumpable)
{ {
vertical = doubleJumpSpeed; vertical = doubleJumpSpeed * Time.fixedDeltaTime;
isJumpable = false; isJumpable = false;
} }
} }
...@@ -67,7 +67,7 @@ public class PlayerController : MonoBehaviour { ...@@ -67,7 +67,7 @@ public class PlayerController : MonoBehaviour {
bool IsGrounded() // Is player grounded? bool IsGrounded() // Is player grounded?
{ {
RaycastHit2D hit = Physics2D.Raycast(transform.position, Vector2.down, rayDistance, groundLayer); RaycastHit2D hit = Physics2D.Raycast(transform.position, Vector2.down, rayDistance, groundLayer);
Debug.DrawRay(transform.position, rayDistance* Vector2.down, Color.white); Debug.DrawRay(transform.position, rayDistance * Vector2.down, Color.white);
return hit.collider != null; return hit.collider != null;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment