fixed combining branch
This commit is contained in:
parent
1b634fd829
commit
153a1b4f8d
@ -252,7 +252,9 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
Data: {fileID: 11400000, guid: fec218a9d55267dedac6ebe31eab6dcd, type: 2}
|
Data: {fileID: 11400000, guid: fec218a9d55267dedac6ebe31eab6dcd, type: 2}
|
||||||
_groundCheckSize: {x: 0.49, y: 0.93}
|
in_range: 0
|
||||||
|
enemy: {fileID: 0}
|
||||||
|
_groundCheckSize: {x: 0.49, y: 0.57}
|
||||||
_wallCheckSize: {x: 0.5, y: 1}
|
_wallCheckSize: {x: 0.5, y: 1}
|
||||||
_groundLayer:
|
_groundLayer:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
|
@ -357,11 +357,11 @@ PrefabInstance:
|
|||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 493245979038171992, guid: d175e4c5882b2464ab0425220d00a671, type: 3}
|
- target: {fileID: 493245979038171992, guid: d175e4c5882b2464ab0425220d00a671, type: 3}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: -30.56
|
value: -14.54
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 493245979038171992, guid: d175e4c5882b2464ab0425220d00a671, type: 3}
|
- target: {fileID: 493245979038171992, guid: d175e4c5882b2464ab0425220d00a671, type: 3}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: -10.5
|
value: -10.53
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 493245979038171992, guid: d175e4c5882b2464ab0425220d00a671, type: 3}
|
- target: {fileID: 493245979038171992, guid: d175e4c5882b2464ab0425220d00a671, type: 3}
|
||||||
propertyPath: m_LocalPosition.z
|
propertyPath: m_LocalPosition.z
|
||||||
@ -1365,7 +1365,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &724240633
|
--- !u!224 &724240633
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -2670,7 +2670,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1385054184
|
--- !u!224 &1385054184
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -97,6 +97,12 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
CheckDirectionToFace(_moveInput.x > 0);
|
CheckDirectionToFace(_moveInput.x > 0);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
if (!IsJumping) {
|
||||||
|
print("not jumping");
|
||||||
|
} else {
|
||||||
|
print("jumping, " + RB.velocity.y);
|
||||||
|
}
|
||||||
|
|
||||||
#region COLLISION CHECKS
|
#region COLLISION CHECKS
|
||||||
if (!IsJumping)
|
if (!IsJumping)
|
||||||
{
|
{
|
||||||
@ -119,12 +125,14 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
|
|
||||||
//Two checks needed for both left and right walls since whenever the play turns the wall checkPoints swap sides
|
//Two checks needed for both left and right walls since whenever the play turns the wall checkPoints swap sides
|
||||||
LastOnWallTime = Mathf.Max(LastOnWallLeftTime, LastOnWallRightTime);
|
LastOnWallTime = Mathf.Max(LastOnWallLeftTime, LastOnWallRightTime);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region JUMP CHECKS
|
#region JUMP CHECKS
|
||||||
if (IsJumping && RB.velocity.y < 0)
|
if (IsJumping && RB.velocity.y <= 0)
|
||||||
{
|
{
|
||||||
IsJumping = false;
|
IsJumping = false;
|
||||||
|
print("isJumping " + IsJumping);
|
||||||
|
|
||||||
if (!IsWallJumping)
|
if (!IsWallJumping)
|
||||||
_isJumpFalling = true;
|
_isJumpFalling = true;
|
||||||
@ -217,7 +225,6 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
@ -419,6 +426,7 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
public bool IsGrounded() {
|
public bool IsGrounded() {
|
||||||
|
// print(Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping);
|
||||||
return (Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping);
|
return (Physics2D.OverlapBox(this.transform.position, _groundCheckSize, 0, _groundLayer) && !IsJumping);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user