expose rope squeze damage & update rope texture
This commit is contained in:
parent
a6e8eb31d3
commit
30233a2347
|
@ -44,7 +44,7 @@ Material:
|
|||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 2800000, guid: c19dca7dba0e0ab4eaf3d513ab5128bb, type: 3}
|
||||
m_Texture: {fileID: 2800000, guid: 35a2c8d34a4b1bf44aaf5fe1847f24b9, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
|
|
|
@ -185,7 +185,7 @@ Camera:
|
|||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 16.46
|
||||
orthographic size: 10.3
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
|
@ -628,7 +628,7 @@ MonoBehaviour:
|
|||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
minThreshold: 1
|
||||
squezeDamageScalor: 0
|
||||
squezeDamageScalor: 1
|
||||
--- !u!50 &220016288
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
|
@ -2046,7 +2046,7 @@ LineRenderer:
|
|||
numCapVertices: 0
|
||||
alignment: 0
|
||||
textureMode: 1
|
||||
textureScale: {x: 1, y: 1}
|
||||
textureScale: {x: 1, y: -1}
|
||||
shadowBias: 0.5
|
||||
generateLightingData: 0
|
||||
m_MaskInteraction: 0
|
||||
|
@ -2083,6 +2083,7 @@ MonoBehaviour:
|
|||
xyGravityDampScalor: 1
|
||||
ropeExtendSpeed: 10
|
||||
ropeShrinkSpeed: 15
|
||||
squezeDamage: 1
|
||||
ropeMaxLength: 50
|
||||
ropeMinLength: 20
|
||||
lineRenderer: {fileID: 1647138191}
|
||||
|
|
|
@ -53,9 +53,12 @@ public class RopeSimulator : MonoBehaviour
|
|||
[SerializeField, Range(0f, 20f)]
|
||||
public float ropeExtendSpeed, ropeShrinkSpeed;
|
||||
|
||||
public float squezeDamage = 1f;
|
||||
|
||||
[SerializeField]
|
||||
public float ropeMaxLength, ropeMinLength;
|
||||
|
||||
|
||||
[Header("Rendering")]
|
||||
[SerializeField] LineRenderer lineRenderer;
|
||||
|
||||
|
@ -263,7 +266,7 @@ public class RopeSimulator : MonoBehaviour
|
|||
ISquezeDamageReceiver squezeDamageReceiver = collider.Key.GetComponent<ISquezeDamageReceiver>();
|
||||
if (squezeDamageReceiver == null) continue;
|
||||
|
||||
squezeDamageReceiver.TakeSquezeDamage(collider.Value);
|
||||
squezeDamageReceiver.TakeSquezeDamage(collider.Value * squezeDamage);
|
||||
}
|
||||
|
||||
// Update line renderer
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.3 KiB |
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c19dca7dba0e0ab4eaf3d513ab5128bb
|
||||
guid: 35a2c8d34a4b1bf44aaf5fe1847f24b9
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
|
@ -52,7 +52,7 @@ TextureImporter:
|
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 1
|
Loading…
Reference in New Issue