Made dissolving leafs

This commit is contained in:
go38coz
2026-06-06 22:07:17 +02:00
parent cf94423d46
commit 68d28bd8be
5 changed files with 136 additions and 110 deletions
@@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 735344641685282090}
- component: {fileID: -1492744888846132070}
- component: {fileID: -3335685204144903253}
- component: {fileID: 3133249139287613830}
- component: {fileID: 7517693285539812101}
m_Layer: 0
m_Name: DryLeafNew_0
m_TagString: Platform
@@ -159,49 +159,16 @@ PlatformEffector2D:
m_UseSideFriction: 0
m_UseSideBounce: 0
m_SideArc: 1
--- !u!61 &3133249139287613830
BoxCollider2D:
--- !u!114 &7517693285539812101
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1463382805851734624}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 2.1567569, y: -0.29434186}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 9.47, y: 3.38}
newSize: {x: 9.47, y: 3.38}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1.9602454, y: 0.3791479}
m_EdgeRadius: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c9a8039b5a5594b38924248d8b768f98, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::LeafDissolve
standingTime: 0
+121 -65
View File
@@ -124,6 +124,123 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
m_PrefabInstance: {fileID: 1489069184}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &172632031
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -1492744888846132070, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Size.x
value: 4.6340055
objectReference: {fileID: 0}
- target: {fileID: -1492744888846132070, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Size.y
value: 0.50008446
objectReference: {fileID: 0}
- target: {fileID: -1492744888846132070, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Offset.x
value: 0.68590295
objectReference: {fileID: 0}
- target: {fileID: -1492744888846132070, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Offset.y
value: -0.24301389
objectReference: {fileID: 0}
- target: {fileID: -1492744888846132070, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_EdgeRadius
value: 0
objectReference: {fileID: 0}
- target: {fileID: 735344641685282090, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: 'm_Materials.Array.data[0]'
value:
objectReference: {fileID: 2100000, guid: 4ce1d40002cfb93efb2da6c87b52e993, type: 2}
- target: {fileID: 1463382805851734624, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Name
value: DryLeafNew_0
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Size.x
value: 2.1616702
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_Offset.x
value: 2.0560443
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_AutoTiling
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_EdgeRadius
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_UsedByEffector
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3133249139287613830, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_CompositeOperation
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalPosition.x
value: -3.8668678
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalPosition.y
value: 4.9505477
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9999998
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalRotation.z
value: -0.000597994
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426081893402170981, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -0.069
objectReference: {fileID: 0}
- target: {fileID: 7517693285539812101, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: standingTime
value: 3
objectReference: {fileID: 0}
- target: {fileID: 7517693285539812101, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
propertyPath: maxStandingTime
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d884ccab0920fae478ea44fb08a65c5a, type: 3}
--- !u!1001 &274994935
PrefabInstance:
m_ObjectHideFlags: 0
@@ -555,12 +672,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2b3b9fc97a2d39d2d84c4be43a79247a, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::DamageHandler
threshold: 2.5
multiplier: 0.5
threshold: 12
multiplier: 0.1
maxHealth: 1
health: 0
minSize: 0.4
maxFallingTime: 2
fallingAnimTreshold: 0.5
--- !u!1001 &1445156949
PrefabInstance:
m_ObjectHideFlags: 0
@@ -790,11 +908,6 @@ PrefabInstance:
insertIndex: -1
addedObject: {fileID: 526821483}
m_SourcePrefab: {fileID: 100100000, guid: 63a81e9c39aed7249bdeb557c0054e6c, type: 3}
--- !u!4 &1710653547 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
m_PrefabInstance: {fileID: 1958370634}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1779940216
GameObject:
m_ObjectHideFlags: 0
@@ -1005,63 +1118,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
m_PrefabInstance: {fileID: 1890470405}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1958370634
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2072448676}
m_Modifications:
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalPosition.x
value: -5.67
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalPosition.y
value: 5.38
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2163867978973577705, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8871780616060845038, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
propertyPath: m_Name
value: Branch (2)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2f44dc6d6adb9ae7f9b4f644da0e3485, type: 3}
--- !u!1 &2072448675
GameObject:
m_ObjectHideFlags: 0
@@ -1095,7 +1151,6 @@ Transform:
- {fileID: 1124127124}
- {fileID: 33859906}
- {fileID: 688751894}
- {fileID: 1710653547}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1660057539 &9223372036854775807
@@ -1108,3 +1163,4 @@ SceneRoots:
- {fileID: 1445156949}
- {fileID: 750131492}
- {fileID: 488250683}
- {fileID: 172632031}
+3 -3
View File
@@ -7,8 +7,8 @@ public class DamageHandler : MonoBehaviour
{
private Rigidbody2D rb;
private Animator animator;
public float threshold = 2.5f;
public float multiplier = 0.5f;
public float threshold = 12;
public float multiplier = 0.1f;
public float maxHealth = 1f;
public float health;
@@ -18,7 +18,7 @@ public class DamageHandler : MonoBehaviour
private bool falling;
private float fallTime;
public float maxFallingTime = 2f;
public float fallingAnimTreshold = 0.5f;
public float fallingAnimTreshold = 0.2f;
private void Awake()
@@ -322,6 +322,9 @@ MonoBehaviour:
highQualityFiltering:
m_OverrideState: 1
m_Value: 0
filter:
m_OverrideState: 1
m_Value: 0
downscale:
m_OverrideState: 1
m_Value: 0
+1 -1
View File
@@ -37,7 +37,7 @@ GraphicsSettings:
m_PreloadedShaders: []
m_PreloadShadersBatchTimeLimit: -1
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_CustomRenderPipeline: {fileID: 0}
m_CustomRenderPipeline: {fileID: 11400000, guid: b7e46b1e32e2da520b9298ba27232811, type: 2}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1