diff --git a/Assets/Materials/Rope.mat b/Assets/Materials/Rope.mat index 47a10d5..983d8f9 100644 --- a/Assets/Materials/Rope.mat +++ b/Assets/Materials/Rope.mat @@ -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: diff --git a/Assets/Scenes/EnemyRope.unity b/Assets/Scenes/EnemyRope.unity index 8c81864..6e44196 100644 --- a/Assets/Scenes/EnemyRope.unity +++ b/Assets/Scenes/EnemyRope.unity @@ -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} diff --git a/Assets/Scripts/Rope/RopeSimulator.cs b/Assets/Scripts/Rope/RopeSimulator.cs index 8001865..01a8948 100644 --- a/Assets/Scripts/Rope/RopeSimulator.cs +++ b/Assets/Scripts/Rope/RopeSimulator.cs @@ -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(); if (squezeDamageReceiver == null) continue; - squezeDamageReceiver.TakeSquezeDamage(collider.Value); + squezeDamageReceiver.TakeSquezeDamage(collider.Value * squezeDamage); } // Update line renderer diff --git a/Assets/TempSprites/Rope.png b/Assets/Sprites/Rope.png similarity index 54% rename from Assets/TempSprites/Rope.png rename to Assets/Sprites/Rope.png index 44000ee..c7d7127 100644 Binary files a/Assets/TempSprites/Rope.png and b/Assets/Sprites/Rope.png differ diff --git a/Assets/TempSprites/Rope.png.meta b/Assets/Sprites/Rope.png.meta similarity index 97% rename from Assets/TempSprites/Rope.png.meta rename to Assets/Sprites/Rope.png.meta index f6b0b2b..d51ea0b 100644 --- a/Assets/TempSprites/Rope.png.meta +++ b/Assets/Sprites/Rope.png.meta @@ -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