Compare commits
No commits in common. "85af588eacce8935be63c7764b71830273a723a6" and "4c1ad8e5854796f9e135f11fde71f5367a1fad7a" have entirely different histories.
85af588eac
...
4c1ad8e585
|
@ -66,34 +66,9 @@ MonoBehaviour:
|
|||
ropeExtendSpeed: 10
|
||||
ropeShrinkSpeed: 15
|
||||
squezeDamage: 1
|
||||
swingSpeedToDamageMultiplier:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0.39527363
|
||||
outSlope: 0.39527363
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0
|
||||
outWeight: 0.04244307
|
||||
- serializedVersion: 3
|
||||
time: 30
|
||||
value: 5
|
||||
inSlope: 0.01896792
|
||||
outSlope: 0.01896792
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.066252515
|
||||
outWeight: 0
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
ropeMaxLength: 50
|
||||
ropeMinLength: 20
|
||||
lineRenderer: {fileID: 901761791259710742}
|
||||
pullAnimationOvershootThreshold: 0.2
|
||||
--- !u!120 &901761791259710742
|
||||
LineRenderer:
|
||||
serializedVersion: 2
|
||||
|
|
|
@ -54,7 +54,6 @@ public class RopeSimulator : MonoBehaviour
|
|||
public float ropeExtendSpeed, ropeShrinkSpeed;
|
||||
|
||||
public float squezeDamage = 1f;
|
||||
public AnimationCurve swingSpeedToDamageMultiplier;
|
||||
|
||||
[SerializeField]
|
||||
public float ropeMaxLength, ropeMinLength;
|
||||
|
@ -69,7 +68,6 @@ public class RopeSimulator : MonoBehaviour
|
|||
int[] order;
|
||||
|
||||
public float Overshoot => rope.CalculateLengthOvershoot();
|
||||
public bool InSwingMode => start.locked || end.locked;
|
||||
|
||||
public Rope rope;
|
||||
|
||||
|
@ -297,9 +295,7 @@ public class RopeSimulator : MonoBehaviour
|
|||
|
||||
if (squezeDamageReceiver == null) continue;
|
||||
|
||||
|
||||
float swingMultiplier = InSwingMode ? swingSpeedToDamageMultiplier.Evaluate((start.locked ? end : start).body.velocity.magnitude) : 1f;
|
||||
squezeDamageReceiver.TakeSquezeDamage(collider.Value * squezeDamage * swingMultiplier);
|
||||
squezeDamageReceiver.TakeSquezeDamage(collider.Value * squezeDamage);
|
||||
}
|
||||
|
||||
// Update line renderer
|
||||
|
|
Loading…
Reference in New Issue