BOING!!!!!!
This commit is contained in:
parent
60a54adcf8
commit
368fbcb634
@ -10,7 +10,6 @@ GameObject:
|
|||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 8574288191223281125}
|
- component: {fileID: 8574288191223281125}
|
||||||
- component: {fileID: 8004311008239541573}
|
- component: {fileID: 8004311008239541573}
|
||||||
- component: {fileID: 1200350290249857739}
|
|
||||||
- component: {fileID: 3074979239951328625}
|
- component: {fileID: 3074979239951328625}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: water
|
m_Name: water
|
||||||
@ -87,19 +86,6 @@ SpriteRenderer:
|
|||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
--- !u!114 &1200350290249857739
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1476043796409163884}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: f11c011d93f67a140b0991fa94ea41c3, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
bounceForce: 2
|
|
||||||
--- !u!61 &3074979239951328625
|
--- !u!61 &3074979239951328625
|
||||||
BoxCollider2D:
|
BoxCollider2D:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -157,7 +143,7 @@ GameObject:
|
|||||||
- component: {fileID: 3190295003044267436}
|
- component: {fileID: 3190295003044267436}
|
||||||
- component: {fileID: 3996260041246843173}
|
- component: {fileID: 3996260041246843173}
|
||||||
- component: {fileID: 2327441879067933148}
|
- component: {fileID: 2327441879067933148}
|
||||||
m_Layer: 0
|
m_Layer: 6
|
||||||
m_Name: bounce
|
m_Name: bounce
|
||||||
m_TagString: bouncy
|
m_TagString: bouncy
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
|
@ -3356,6 +3356,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_camera
|
propertyPath: m_camera
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 519420031}
|
objectReference: {fileID: 519420031}
|
||||||
|
- target: {fileID: 3893791749692807526, guid: 576d3fc87874f426294e4bbacb171478, type: 3}
|
||||||
|
propertyPath: bonk
|
||||||
|
value: 1.5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5885597207104481986, guid: 576d3fc87874f426294e4bbacb171478, type: 3}
|
- target: {fileID: 5885597207104481986, guid: 576d3fc87874f426294e4bbacb171478, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 11
|
value: 11
|
||||||
@ -32074,8 +32078,7 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents:
|
m_RemovedComponents: []
|
||||||
- {fileID: 1200350290249857739, guid: b7611ec9c156a6d40ae4a76a0def99dd, type: 3}
|
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
m_AddedComponents: []
|
m_AddedComponents: []
|
||||||
|
@ -226,16 +226,14 @@ public class PlayerBehavior : MonoBehaviour
|
|||||||
|
|
||||||
void Bounce()
|
void Bounce()
|
||||||
{
|
{
|
||||||
Vector2 reflect = new Vector2(-(saveVelocity.x),-(saveVelocity.y) * bonk);
|
Vector2 reflect = new Vector2(saveVelocity.x,-(saveVelocity.y) * bonk);
|
||||||
print("x vel: " + saveVelocity.x);
|
|
||||||
print("y vel: " + saveVelocity.y);
|
|
||||||
_rb.AddForce(reflect, ForceMode2D.Impulse);
|
_rb.AddForce(reflect, ForceMode2D.Impulse);
|
||||||
print("boing");
|
print("boing");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Water()
|
void Water()
|
||||||
{
|
{
|
||||||
if(_rb.velocity.y < 0.2f)
|
if(Mathf.Abs(_rb.velocity.y) < 2f)
|
||||||
{
|
{
|
||||||
saveVelocity = Vector2.zero;
|
saveVelocity = Vector2.zero;
|
||||||
isInWater = true;
|
isInWater = true;
|
||||||
@ -244,7 +242,6 @@ public class PlayerBehavior : MonoBehaviour
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
saveVelocity = _rb.velocity;
|
saveVelocity = _rb.velocity;
|
||||||
//_rb.AddForce(saveVelocity, ForceMode2D.Force);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,10 +310,10 @@ public class PlayerMovement : MonoBehaviour
|
|||||||
//Caps maximum fall speed, so when falling over large distances we don't accelerate to insanely high speeds
|
//Caps maximum fall speed, so when falling over large distances we don't accelerate to insanely high speeds
|
||||||
RB.velocity = new Vector2(RB.velocity.x, Mathf.Max(RB.velocity.y, -Data.maxFallSpeed));
|
RB.velocity = new Vector2(RB.velocity.x, Mathf.Max(RB.velocity.y, -Data.maxFallSpeed));
|
||||||
}
|
}
|
||||||
else if (playerBehavior.isInWater)
|
/*else if (playerBehavior.isInWater)
|
||||||
{
|
{
|
||||||
SetGravityScale(0);
|
SetGravityScale(0);
|
||||||
}
|
}*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Default gravity if standing on a platform or moving upwards
|
//Default gravity if standing on a platform or moving upwards
|
||||||
|
Loading…
Reference in New Issue
Block a user