mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2025-04-03 20:08:00 +02:00
feat: dynamically create elements levels (#39)
This commit is contained in:
parent
ce92ba53cc
commit
e2bbf26929
@ -1,14 +1,5 @@
|
||||
{
|
||||
"name": "Back on Track",
|
||||
"musicName": "BackOnTrack",
|
||||
"order": 2,
|
||||
"elements": [
|
||||
{
|
||||
"type": "Spike",
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
"order": 2
|
||||
}
|
||||
|
@ -4,11 +4,14 @@
|
||||
"order": 1,
|
||||
"elements": [
|
||||
{
|
||||
"type": "Spike",
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
"type": 0,
|
||||
"x": -6.684000015258789,
|
||||
"y": -2.8970000743865969
|
||||
},
|
||||
{
|
||||
"type": 1,
|
||||
"x": -3.059999942779541,
|
||||
"y": -2.930000066757202
|
||||
}
|
||||
]
|
||||
}
|
||||
|
8
Assets/Resources/Prefabs.meta
Normal file
8
Assets/Resources/Prefabs.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e727115e61afa852f9b3fca47c39c15c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
247
Assets/Resources/Prefabs/Obstacle.prefab
Normal file
247
Assets/Resources/Prefabs/Obstacle.prefab
Normal file
@ -0,0 +1,247 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &4503133877144714992
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5012884470156408499}
|
||||
- component: {fileID: 8308996464851343268}
|
||||
m_Layer: 0
|
||||
m_Name: Obstacle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5012884470156408499
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4503133877144714992}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -6.684, y: -2.897, z: 0}
|
||||
m_LocalScale: {x: 0.96055, y: 0.2326, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 753406095052540359}
|
||||
- {fileID: 3772212889498300441}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &8308996464851343268
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4503133877144714992}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
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_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
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_Sprite: {fileID: 7862696914207302912, guid: cace85b8e53e5df4b92e5cf09eb4a0c9, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 5.14, y: 5.14}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &5192728607521336247
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 753406095052540359}
|
||||
- component: {fileID: 4745569766689628624}
|
||||
m_Layer: 0
|
||||
m_Name: ObstacleSafer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &753406095052540359
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5192728607521336247}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5012884470156408499}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &4745569766689628624
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5192728607521336247}
|
||||
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: -0.004009247, y: 1.7748187}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.121194, y: 1.4569769}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &7427412648610411495
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3772212889498300441}
|
||||
- component: {fileID: 8331097993010127203}
|
||||
m_Layer: 0
|
||||
m_Name: ObstacleKiller
|
||||
m_TagString: Kill
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3772212889498300441
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7427412648610411495}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5012884470156408499}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &8331097993010127203
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7427412648610411495}
|
||||
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: -0.0040085316, y: -0.985047}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.1211915, y: 2.672097}
|
||||
m_EdgeRadius: 0
|
7
Assets/Resources/Prefabs/Obstacle.prefab.meta
Normal file
7
Assets/Resources/Prefabs/Obstacle.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ded5ba9868ed45d64adf56ff6f9f8d80
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
197
Assets/Resources/Prefabs/Spike.prefab
Normal file
197
Assets/Resources/Prefabs/Spike.prefab
Normal file
@ -0,0 +1,197 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &7777828896977100680
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8115733835563602594}
|
||||
- component: {fileID: 4668755637508042186}
|
||||
- component: {fileID: 5986636574179340540}
|
||||
m_Layer: 0
|
||||
m_Name: Spike
|
||||
m_TagString: Kill
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &8115733835563602594
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7777828896977100680}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -3.06, y: -2.93, z: 0}
|
||||
m_LocalScale: {x: 0.15, y: 0.15, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &4668755637508042186
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7777828896977100680}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
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_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
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_Sprite: {fileID: 5761849248444590345, guid: 23159a719d47ecd4ea9ccf80790555c2, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 8.39, y: 9.62}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!60 &5986636574179340540
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7777828896977100680}
|
||||
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: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 8.39, y: 9.62}
|
||||
newSize: {x: 8.39, y: 9.62}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 4.185, y: -3.99}
|
||||
- {x: 4.185, y: -3.81}
|
||||
- {x: 4.1549997, y: -3.7099998}
|
||||
- {x: 4.085, y: -3.56}
|
||||
- {x: 3.965, y: -3.29}
|
||||
- {x: 3.665, y: -2.62}
|
||||
- {x: 2.605, y: -0.24}
|
||||
- {x: 1.5949999, y: 2.03}
|
||||
- {x: 0.615, y: 4.23}
|
||||
- {x: 0.445, y: 4.61}
|
||||
- {x: 0.345, y: 4.74}
|
||||
- {x: 0.24499999, y: 4.7799997}
|
||||
- {x: 0.205, y: 4.79}
|
||||
- {x: 0.055, y: 4.79}
|
||||
- {x: -0.074999996, y: 4.73}
|
||||
- {x: -0.145, y: 4.66}
|
||||
- {x: -0.205, y: 4.5499997}
|
||||
- {x: -0.53499997, y: 3.86}
|
||||
- {x: -0.655, y: 3.61}
|
||||
- {x: -0.755, y: 3.3999999}
|
||||
- {x: -0.865, y: 3.1699998}
|
||||
- {x: -0.865, y: 3.1499999}
|
||||
- {x: -1.0849999, y: 2.71}
|
||||
- {x: -1.295, y: 2.27}
|
||||
- {x: -1.405, y: 2.04}
|
||||
- {x: -1.505, y: 1.8299999}
|
||||
- {x: -2.715, y: -0.7}
|
||||
- {x: -2.715, y: -0.71999997}
|
||||
- {x: -2.935, y: -1.16}
|
||||
- {x: -3.0149999, y: -1.3299999}
|
||||
- {x: -3.215, y: -1.75}
|
||||
- {x: -3.335, y: -2}
|
||||
- {x: -3.995, y: -3.3799999}
|
||||
- {x: -4.125, y: -3.6499999}
|
||||
- {x: -4.1549997, y: -3.6999998}
|
||||
- {x: -4.185, y: -3.78}
|
||||
- {x: -4.185, y: -3.98}
|
||||
- {x: -4.085, y: -4.13}
|
||||
- {x: -4.005, y: -4.17}
|
||||
- {x: -3.915, y: -4.21}
|
||||
- {x: -3.7549999, y: -4.2}
|
||||
- {x: -3.735, y: -4.17}
|
||||
- {x: -2.705, y: -4.17}
|
||||
- {x: -2.695, y: -4.18}
|
||||
- {x: -1.615, y: -4.18}
|
||||
- {x: -1.605, y: -4.19}
|
||||
- {x: -0.78499997, y: -4.19}
|
||||
- {x: -0.775, y: -4.2}
|
||||
- {x: 0.24499999, y: -4.2}
|
||||
- {x: 0.255, y: -4.21}
|
||||
- {x: 1.355, y: -4.21}
|
||||
- {x: 1.365, y: -4.22}
|
||||
- {x: 2.435, y: -4.22}
|
||||
- {x: 2.445, y: -4.23}
|
||||
- {x: 3.5049999, y: -4.23}
|
||||
- {x: 3.5149999, y: -4.24}
|
||||
- {x: 3.865, y: -4.24}
|
||||
- {x: 3.955, y: -4.22}
|
||||
- {x: 4.045, y: -4.18}
|
||||
- {x: 4.1549997, y: -4.08}
|
||||
m_UseDelaunayMesh: 0
|
7
Assets/Resources/Prefabs/Spike.prefab.meta
Normal file
7
Assets/Resources/Prefabs/Spike.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6106ddf26cd56b5ceb9034abdb003e42
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -226,84 +226,6 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerObject: {fileID: 1267397455}
|
||||
--- !u!1 &634865766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 634865767}
|
||||
- component: {fileID: 634865768}
|
||||
m_Layer: 0
|
||||
m_Name: ObstacleKiller
|
||||
m_TagString: Kill
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &634865767
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 634865766}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1009490389}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &634865768
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 634865766}
|
||||
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: -0.0040085316, y: -0.985047}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.1211915, y: 2.672097}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &725779773
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5137,95 +5059,6 @@ ParticleSystem:
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
vectorLabel1_3: W
|
||||
--- !u!1 &1009490386
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1009490389}
|
||||
- component: {fileID: 1009490388}
|
||||
m_Layer: 0
|
||||
m_Name: Obstacle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!212 &1009490388
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1009490386}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
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_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
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_Sprite: {fileID: 7862696914207302912, guid: cace85b8e53e5df4b92e5cf09eb4a0c9, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 5.14, y: 5.14}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &1009490389
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1009490386}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -6.684, y: -2.897, z: 0}
|
||||
m_LocalScale: {x: 0.96055, y: 0.2326, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2006361645}
|
||||
- {fileID: 634865767}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1011717286
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5460,7 +5293,6 @@ GameObject:
|
||||
- component: {fileID: 1267397456}
|
||||
- component: {fileID: 1267397460}
|
||||
- component: {fileID: 1267397459}
|
||||
- component: {fileID: 1267397461}
|
||||
m_Layer: 0
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
@ -5583,7 +5415,6 @@ MonoBehaviour:
|
||||
particle: {fileID: 725779776}
|
||||
levelsLoader: {fileID: 0}
|
||||
isColliding: 1
|
||||
audioSource: {fileID: 1267397461}
|
||||
--- !u!61 &1267397460
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5630,20 +5461,67 @@ BoxCollider2D:
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 0.79, y: 0.79}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!82 &1267397461
|
||||
--- !u!1 &1999482185
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1999482187}
|
||||
- component: {fileID: 1999482186}
|
||||
- component: {fileID: 1999482188}
|
||||
m_Layer: 0
|
||||
m_Name: LevelLoader
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1999482186
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1999482185}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 017ea60a517f31bf3af976010911be25, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
levelsLoader: {fileID: 0}
|
||||
audioSource: {fileID: 1999482188}
|
||||
--- !u!4 &1999482187
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1999482185}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 8.485552, y: 2.2081068, z: -0.13737443}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &1999482188
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1267397455}
|
||||
m_GameObject: {fileID: 1999482185}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 8300000, guid: 681525f18aa52594aa45865f4c54b61a, type: 3}
|
||||
m_Resource: {fileID: 8300000, guid: 681525f18aa52594aa45865f4c54b61a, type: 3}
|
||||
m_audioClip: {fileID: 8300000, guid: 4b3e17e99d442fa4081b5544de2425de, type: 3}
|
||||
m_Resource: {fileID: 8300000, guid: 4b3e17e99d442fa4081b5544de2425de, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 0.5
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
@ -5727,279 +5605,6 @@ AudioSource:
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1 &1783527212
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1783527216}
|
||||
- component: {fileID: 1783527215}
|
||||
- component: {fileID: 1783527214}
|
||||
m_Layer: 0
|
||||
m_Name: Spike
|
||||
m_TagString: Kill
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!60 &1783527214
|
||||
PolygonCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1783527212}
|
||||
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: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 8.39, y: 9.62}
|
||||
newSize: {x: 8.39, y: 9.62}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Points:
|
||||
m_Paths:
|
||||
- - {x: 4.185, y: -3.99}
|
||||
- {x: 4.185, y: -3.81}
|
||||
- {x: 4.1549997, y: -3.7099998}
|
||||
- {x: 4.085, y: -3.56}
|
||||
- {x: 3.965, y: -3.29}
|
||||
- {x: 3.665, y: -2.62}
|
||||
- {x: 2.605, y: -0.24}
|
||||
- {x: 1.5949999, y: 2.03}
|
||||
- {x: 0.615, y: 4.23}
|
||||
- {x: 0.445, y: 4.61}
|
||||
- {x: 0.345, y: 4.74}
|
||||
- {x: 0.24499999, y: 4.7799997}
|
||||
- {x: 0.205, y: 4.79}
|
||||
- {x: 0.055, y: 4.79}
|
||||
- {x: -0.074999996, y: 4.73}
|
||||
- {x: -0.145, y: 4.66}
|
||||
- {x: -0.205, y: 4.5499997}
|
||||
- {x: -0.53499997, y: 3.86}
|
||||
- {x: -0.655, y: 3.61}
|
||||
- {x: -0.755, y: 3.3999999}
|
||||
- {x: -0.865, y: 3.1699998}
|
||||
- {x: -0.865, y: 3.1499999}
|
||||
- {x: -1.0849999, y: 2.71}
|
||||
- {x: -1.295, y: 2.27}
|
||||
- {x: -1.405, y: 2.04}
|
||||
- {x: -1.505, y: 1.8299999}
|
||||
- {x: -2.715, y: -0.7}
|
||||
- {x: -2.715, y: -0.71999997}
|
||||
- {x: -2.935, y: -1.16}
|
||||
- {x: -3.0149999, y: -1.3299999}
|
||||
- {x: -3.215, y: -1.75}
|
||||
- {x: -3.335, y: -2}
|
||||
- {x: -3.995, y: -3.3799999}
|
||||
- {x: -4.125, y: -3.6499999}
|
||||
- {x: -4.1549997, y: -3.6999998}
|
||||
- {x: -4.185, y: -3.78}
|
||||
- {x: -4.185, y: -3.98}
|
||||
- {x: -4.085, y: -4.13}
|
||||
- {x: -4.005, y: -4.17}
|
||||
- {x: -3.915, y: -4.21}
|
||||
- {x: -3.7549999, y: -4.2}
|
||||
- {x: -3.735, y: -4.17}
|
||||
- {x: -2.705, y: -4.17}
|
||||
- {x: -2.695, y: -4.18}
|
||||
- {x: -1.615, y: -4.18}
|
||||
- {x: -1.605, y: -4.19}
|
||||
- {x: -0.78499997, y: -4.19}
|
||||
- {x: -0.775, y: -4.2}
|
||||
- {x: 0.24499999, y: -4.2}
|
||||
- {x: 0.255, y: -4.21}
|
||||
- {x: 1.355, y: -4.21}
|
||||
- {x: 1.365, y: -4.22}
|
||||
- {x: 2.435, y: -4.22}
|
||||
- {x: 2.445, y: -4.23}
|
||||
- {x: 3.5049999, y: -4.23}
|
||||
- {x: 3.5149999, y: -4.24}
|
||||
- {x: 3.865, y: -4.24}
|
||||
- {x: 3.955, y: -4.22}
|
||||
- {x: 4.045, y: -4.18}
|
||||
- {x: 4.1549997, y: -4.08}
|
||||
m_UseDelaunayMesh: 0
|
||||
--- !u!212 &1783527215
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1783527212}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
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_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
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_Sprite: {fileID: 5761849248444590345, guid: 23159a719d47ecd4ea9ccf80790555c2, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 8.39, y: 9.62}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &1783527216
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1783527212}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -3.06, y: -2.93, z: 0}
|
||||
m_LocalScale: {x: 0.15, y: 0.15, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2006361644
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2006361645}
|
||||
- component: {fileID: 2006361646}
|
||||
m_Layer: 0
|
||||
m_Name: ObstacleSafer
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2006361645
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2006361644}
|
||||
serializedVersion: 2
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1009490389}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!61 &2006361646
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2006361644}
|
||||
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: -0.004009247, y: 1.7748187}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0, y: 0}
|
||||
oldSize: {x: 0, y: 0}
|
||||
newSize: {x: 0, y: 0}
|
||||
adaptiveTilingThreshold: 0
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
m_Size: {x: 5.121194, y: 1.4569769}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!1 &2062107675
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -6141,6 +5746,5 @@ SceneRoots:
|
||||
- {fileID: 519420032}
|
||||
- {fileID: 1267397458}
|
||||
- {fileID: 1235900594}
|
||||
- {fileID: 1009490389}
|
||||
- {fileID: 1783527216}
|
||||
- {fileID: 2062107678}
|
||||
- {fileID: 1999482187}
|
||||
|
@ -1,4 +1,21 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
[System.Serializable]
|
||||
public class LevelElement
|
||||
{
|
||||
public enum Type
|
||||
{
|
||||
Obstacle = 0,
|
||||
Spike = 1
|
||||
}
|
||||
|
||||
public Type type;
|
||||
public float x;
|
||||
public float y;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Level
|
||||
@ -11,6 +28,8 @@ public class Level
|
||||
public string musicName;
|
||||
public int order;
|
||||
|
||||
public List<LevelElement> elements;
|
||||
|
||||
public static Level CreateFromJSON(string jsonString)
|
||||
{
|
||||
return JsonUtility.FromJson<Level>(jsonString);
|
||||
|
58
Assets/Scripts/LevelLoader.cs
Normal file
58
Assets/Scripts/LevelLoader.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using UnityEngine;
|
||||
using System.IO;
|
||||
|
||||
public class LevelLoader : MonoBehaviour
|
||||
{
|
||||
public LevelsLoader levelsLoader;
|
||||
public AudioSource audioSource;
|
||||
public GameObject obstaclePrefab;
|
||||
public GameObject spikePrefab;
|
||||
|
||||
void Start()
|
||||
{
|
||||
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
||||
levelsLoader.IncreaseTotalAttempts();
|
||||
|
||||
audioSource.clip = Resources.Load<AudioClip>(Path.Combine("Musics", levelsLoader.levelCurrent.musicName));
|
||||
audioSource.Play();
|
||||
|
||||
obstaclePrefab = Resources.Load<GameObject>("Prefabs/Obstacle");
|
||||
spikePrefab = Resources.Load<GameObject>("Prefabs/Spike");
|
||||
|
||||
Level current = levelsLoader.levelCurrent;
|
||||
// Debug.Log("Level: " + current.name);
|
||||
// for (int i = 0; i < current.elements.Count; i++)
|
||||
// {
|
||||
// LevelElement element = current.elements[i];
|
||||
// Debug.Log("Element: " + element.type + " " + element.x + " " + element.y);
|
||||
// }
|
||||
|
||||
for (int index = 0; index < current.elements.Count; index++)
|
||||
{
|
||||
LevelElement element = current.elements[index];
|
||||
GameObject prefab = obstaclePrefab;
|
||||
|
||||
if (element.type == LevelElement.Type.Spike)
|
||||
{
|
||||
prefab = spikePrefab;
|
||||
}
|
||||
|
||||
Instantiate(prefab, new Vector3(element.x, element.y, 0), Quaternion.identity);
|
||||
}
|
||||
|
||||
// // Obstacle
|
||||
// // x=-6.684, y=-2.897, 0
|
||||
// // scale=0.96055, 0.2326, 1
|
||||
// Instantiate(obstaclePrefab, new Vector3(-6.684f, -2.897f, 0), Quaternion.identity);
|
||||
|
||||
// // Spike
|
||||
// // -3.06, -2.93
|
||||
// // scale=0.15, 0.15, 1
|
||||
// Instantiate(spikePrefab, new Vector3(-3.06f, -2.93f, 0), Quaternion.identity);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
2
Assets/Scripts/LevelLoader.cs.meta
Normal file
2
Assets/Scripts/LevelLoader.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 017ea60a517f31bf3af976010911be25
|
@ -23,6 +23,7 @@ public class LevelsLoader : MonoBehaviour
|
||||
foreach (TextAsset jsonTextFileStats in levelStatsFiles)
|
||||
{
|
||||
LevelStat levelStat = LevelStat.CreateFromJSON(jsonTextFileStats.text);
|
||||
levelStat.JsonName = jsonTextFileStats.name;
|
||||
levelStatsMap[levelStat.JsonName] = levelStat;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,6 @@ public class Player : MonoBehaviour
|
||||
public LevelsLoader levelsLoader;
|
||||
|
||||
public bool isColliding = true;
|
||||
public AudioSource audioSource;
|
||||
private bool hasStarted = false;
|
||||
|
||||
private bool canJump = true;
|
||||
@ -18,10 +17,6 @@ public class Player : MonoBehaviour
|
||||
public void Start()
|
||||
{
|
||||
levelsLoader = GameObject.FindGameObjectWithTag("LevelsLoader").GetComponent<LevelsLoader>();
|
||||
levelsLoader.IncreaseTotalAttempts();
|
||||
|
||||
audioSource.clip = Resources.Load<AudioClip>(Path.Combine("Musics", levelsLoader.levelCurrent.musicName));
|
||||
audioSource.Play();
|
||||
|
||||
var mainModule = particle.main;
|
||||
mainModule.simulationSpace = ParticleSystemSimulationSpace.World;
|
||||
@ -56,7 +51,6 @@ public class Player : MonoBehaviour
|
||||
}
|
||||
|
||||
UpdateParticlePositionAndRotation();
|
||||
UpdateParticleSystemSpeed();
|
||||
}
|
||||
|
||||
private void Jump()
|
||||
@ -84,12 +78,6 @@ public class Player : MonoBehaviour
|
||||
particle.transform.rotation = Quaternion.Euler(0, 0, 150.464f);
|
||||
}
|
||||
|
||||
private void UpdateParticleSystemSpeed()
|
||||
{
|
||||
var velocityOverLifetime = particle.velocityOverLifetime;
|
||||
velocityOverLifetime.x = rigidBody.linearVelocity.x;
|
||||
}
|
||||
|
||||
public void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
isColliding = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user