Commit d2a9c76e authored by Marcel's avatar Marcel
Browse files

Destroyable Tiles funktionieren

parent 7324b46b
......@@ -57,6 +57,7 @@ GameObject:
- component: {fileID: 2759133192090581495}
- component: {fileID: 7146346331081433715}
- component: {fileID: 2351685636506725070}
- component: {fileID: 2405934041975702046}
m_Layer: 10
m_Name: deadly
m_TagString: Untagged
......@@ -117,6 +118,27 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
isActive: 1
--- !u!50 &2405934041975702046
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4155861808315413167}
m_BodyType: 1
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!1 &4766415447895847532
GameObject:
m_ObjectHideFlags: 0
......
This diff is collapsed.
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657826, g: 0.49641263, b: 0.57481676, a: 1}
m_IndirectSpecularColor: {r: 0.44657844, g: 0.49641222, b: 0.57481694, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -588,6 +588,7 @@ Transform:
- {fileID: 1032004056}
- {fileID: 1281965960}
- {fileID: 574266992}
- {fileID: 1722232698}
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -733,25 +734,25 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 19556386157785872, guid: e804e536083fc83499f1ea6ca298f699,
type: 3}
propertyPath: m_TagString
value: MainCamera
objectReference: {fileID: 0}
- target: {fileID: 19556384512477799, guid: e804e536083fc83499f1ea6ca298f699,
type: 3}
propertyPath: m_BoundingShape2D
value:
objectReference: {fileID: 1550686153}
- target: {fileID: 19556386157785872, guid: e804e536083fc83499f1ea6ca298f699,
type: 3}
propertyPath: m_TagString
value: MainCamera
objectReference: {fileID: 0}
- target: {fileID: 19556386157785875, guid: e804e536083fc83499f1ea6ca298f699,
type: 3}
propertyPath: m_LocalPosition.x
value: -4.4504128
value: -4.772993
objectReference: {fileID: 0}
- target: {fileID: 19556386157785875, guid: e804e536083fc83499f1ea6ca298f699,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.025909185
value: -0.027786136
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e804e536083fc83499f1ea6ca298f699, type: 3}
......@@ -7693,16 +7694,6 @@ PrefabInstance:
propertyPath: m_isInputParsingRequired
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6970042148868717515, guid: bf18cb00ef043184eb50a0f82e61aba6,
type: 3}
propertyPath: groupButton
value:
objectReference: {fileID: 177443447}
- target: {fileID: 6970042148868717515, guid: bf18cb00ef043184eb50a0f82e61aba6,
type: 3}
propertyPath: level
value: 2
objectReference: {fileID: 0}
- target: {fileID: 434592542853494592, guid: bf18cb00ef043184eb50a0f82e61aba6,
type: 3}
propertyPath: m_havePropertiesChanged
......@@ -7713,6 +7704,16 @@ PrefabInstance:
propertyPath: m_isInputParsingRequired
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6970042148868717515, guid: bf18cb00ef043184eb50a0f82e61aba6,
type: 3}
propertyPath: groupButton
value:
objectReference: {fileID: 177443447}
- target: {fileID: 6970042148868717515, guid: bf18cb00ef043184eb50a0f82e61aba6,
type: 3}
propertyPath: level
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bf18cb00ef043184eb50a0f82e61aba6, type: 3}
--- !u!4 &1353807006 stripped
......@@ -8732,6 +8733,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c88f077fe5d375e468cec39724778166, type: 3}
m_Name:
m_EditorClassIdentifier:
childTile: 5
--- !u!483693784 &1430180437
TilemapRenderer:
m_ObjectHideFlags: 0
......@@ -9018,61 +9020,6 @@ PrefabInstance:
propertyPath: m_Name
value: Background
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[2].x
value: -14.121731
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[2].y
value: -5.4668036
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[1].x
value: -14.147966
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[1].y
value: 17.120018
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[3].x
value: 21.94378
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[3].y
value: -5.40877
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[4].x
value: 21.81422
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[4].y
value: 16.846226
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[0].y
value: 16.93486
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[0].x
value: 21.68455
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8375226316301169767, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_LocalPosition.x
......@@ -9128,6 +9075,61 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[2].x
value: -14.121731
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[2].y
value: -5.4668036
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[1].x
value: -14.147966
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[1].y
value: 17.120018
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[3].x
value: 21.94378
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[3].y
value: -5.40877
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[4].x
value: 21.81422
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[4].y
value: 16.846226
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[0].y
value: 16.93486
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_Points.m_Paths.Array.data[0].Array.data[0].x
value: 21.68455
objectReference: {fileID: 0}
- target: {fileID: 3867834897397423627, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_IsTrigger
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6026287475586208035, guid: d7ad169a547d4f449b3a75f5845af2a1,
type: 3}
propertyPath: m_LocalPosition.y
......@@ -9481,6 +9483,203 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e1467377f245eb84aa7a84024c1a2142, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &1722232697
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1722232698}
- component: {fileID: 1722232703}
- component: {fileID: 1722232702}
- component: {fileID: 1722232701}
- component: {fileID: 1722232700}
- component: {fileID: 1722232699}
m_Layer: 0
m_Name: ExStachelDestroyable
m_TagString: Ground
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1722232698
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722232697}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 269022355}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1722232699
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722232697}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7eaab7c5d50c7d242a950c02e5c2ed0d, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!50 &1722232700
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722232697}
m_BodyType: 2
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDrag: 0
m_AngularDrag: 0.05
m_GravityScale: 1
m_Material: {fileID: 6200000, guid: 6b68a90c69460854a8c3e3f1997a951f, type: 2}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!19719996 &1722232701
TilemapCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722232697}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
--- !u!483693784 &1722232702
TilemapRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722232697}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_ChunkSize: {x: 32, y: 32, z: 32}
m_ChunkCullingBounds: {x: 0, y: 0, z: 0}
m_MaxChunkCount: 16
m_MaxFrameAge: 16
m_SortOrder: 0
m_Mode: 0
m_DetectChunkCullingBounds: 0
m_MaskInteraction: 0
--- !u!1839735485 &1722232703
Tilemap:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1722232697}
m_Enabled: 1
m_Tiles:
- first: {x: 26, y: -3, z: 0}
second:
m_TileIndex: 0
m_TileSpriteIndex: 0
m_TileMatrixIndex: 0
m_TileColorIndex: 0
m_ObjectToInstantiate: {fileID: 0}
m_TileFlags: 1
m_ColliderType: 1
m_AnimatedTiles: {}
m_TileAssetArray:
- m_RefCount: 1
m_Data: {fileID: 11400000, guid: 8a16c81947deace47a15a3bc2ce1ea02, type: 2}
m_TileSpriteArray:
- m_RefCount: 1
m_Data: {fileID: 21300042, guid: 17aec3dce66c3614f85e23bf630f81da, type: 3}
m_TileMatrixArray:
- m_RefCount: 1
m_Data:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_TileColorArray:
- m_RefCount: 1
m_Data: {r: 1, g: 1, b: 1, a: 1}
m_AnimationFrameRate: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Origin: {x: 0, y: -3, z: 0}
m_Size: {x: 27, y: 3, z: 1}
m_TileAnchor: {x: 0.5, y: 0.5, z: 0}
m_TileOrientation: 0
m_TileOrientationMatrix:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
--- !u!1001 &1857842714
PrefabInstance:
m_ObjectHideFlags: 0
......
......@@ -7,12 +7,13 @@ public class DeadlyTilemap : MonoBehaviour
private Tilemap deadlyMap;
private Tilemap groundMap;
private Tile unDeadlyTile;
[SerializeField] private int childTile = 0;
private void Start()
{
unDeadlyTile = Resources.Load<Tile>("UnDeadly");
deadlyMap = GetComponent<Tilemap>();
groundMap = transform.parent.GetChild(0).GetComponent<Tilemap>();
groundMap = transform.parent.GetChild(childTile).GetComponent<Tilemap>();
}
private void OnCollisionEnter2D(Collision2D other)
......@@ -41,6 +42,7 @@ public class DeadlyTilemap : MonoBehaviour
Vector3Int posOnDeadly = deadlyMap.WorldToCell(pos);
deadlyMap.SetTile(posOnDeadly, null);
}
if (other.transform.CompareTag("Player") || other.transform.CompareTag("Group"))
{
......
......@@ -36,6 +36,8 @@ GraphicsSettings:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
......
......@@ -4,7 +4,7 @@
UnityConnectSettings:
m_ObjectHideFlags: 0
serializedVersion: 1
m_Enabled: 0
m_Enabled: 1
m_TestMode: 0
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment