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