fix boulder trap

This commit is contained in:
Cat Flynn 2021-05-16 17:08:35 +01:00
parent 9db0e8eb0a
commit b4a331a63b
5 changed files with 538 additions and 187 deletions

View File

@ -31930,6 +31930,162 @@ PrefabInstance:
m_Modification: m_Modification:
m_TransformParent: {fileID: 224665715316747892} m_TransformParent: {fileID: 224665715316747892}
m_Modifications: m_Modifications:
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.tabIndex
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.showNormals
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.vertexPathUpToDate
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.showNormalsInVertexMode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.showBezierPathInVertexMode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.globalDisplaySettingsFoldout
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData.showVertexPathDisplayOptions
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.globalNormalsAngle
value: 180
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[0].x
value: -3.2753177
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[0].y
value: 2.9480512
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[0].z
value: -0.009243011
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[1].x
value: -2.754836
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[1].y
value: 2.6613731
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[1].z
value: -0.017781496
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[2].x
value: 3.6670642
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[2].y
value: -0.37177658
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[2].z
value: -0.024957655
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[3].x
value: 4.213554
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[3].y
value: -0.63153833
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[3].z
value: -0.020473478
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[4].x
value: 7.5468664
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[4].y
value: -2.1878014
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[4].z
value: -0.053318024
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[5].x
value: 9.683247
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[5].y
value: -7.223474
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[5].z
value: -0.13787416
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[6].x
value: 9.839137
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[6].y
value: -8.46622
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[6].z
value: -0.071509354
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[7].x
value: 14.423021
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[7].y
value: -8.425384
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[7].z
value: 0.040977474
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[8].x
value: 30.937803
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[8].y
value: -8.504596
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[8].z
value: -0.057106003
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[9].x
value: 35.122513
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[9].y
value: -8.471488
objectReference: {fileID: 0}
- target: {fileID: 1541764264070722539, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: editorData._bezierPath.points.Array.data[9].z
value: -0.04985141
objectReference: {fileID: 0}
- target: {fileID: 2136135615572265879, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: speed
value: 10
objectReference: {fileID: 0}
- target: {fileID: 3284889540147964939, guid: baf177258b70ed448964e62915be41ee, type: 3} - target: {fileID: 3284889540147964939, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 2.79 value: 2.79
@ -31998,10 +32154,46 @@ PrefabInstance:
propertyPath: waitToDestroy propertyPath: waitToDestroy
value: 5 value: 5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8266553266722004867, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_LocalPosition.x
value: -3.2753181
objectReference: {fileID: 0}
- target: {fileID: 8266553266722004867, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_LocalPosition.y
value: 2.9480515
objectReference: {fileID: 0}
- target: {fileID: 8266553266722004867, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_LocalPosition.z
value: -0.0092430115
objectReference: {fileID: 0}
- target: {fileID: 8693320603023675547, guid: baf177258b70ed448964e62915be41ee, type: 3} - target: {fileID: 8693320603023675547, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: speed propertyPath: speed
value: 10 value: 10
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8972538804980000285, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_Size.x
value: 17.442335
objectReference: {fileID: 0}
- target: {fileID: 8972538804980000285, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_Size.y
value: 9.281789
objectReference: {fileID: 0}
- target: {fileID: 8972538804980000285, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_Size.z
value: 6.598832
objectReference: {fileID: 0}
- target: {fileID: 8972538804980000285, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_Center.x
value: 14.29001
objectReference: {fileID: 0}
- target: {fileID: 8972538804980000285, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_Center.y
value: -4.1408944
objectReference: {fileID: 0}
- target: {fileID: 8972538804980000285, guid: baf177258b70ed448964e62915be41ee, type: 3}
propertyPath: m_Center.z
value: 0.1741266
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: baf177258b70ed448964e62915be41ee, type: 3} m_SourcePrefab: {fileID: 100100000, guid: baf177258b70ed448964e62915be41ee, type: 3}
--- !u!4 &1696240017663993035 stripped --- !u!4 &1696240017663993035 stripped

View File

@ -59,6 +59,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 057a6d45d8ae84046ba8843eb3ba4260, type: 3} m_Script: {fileID: 11500000, guid: 057a6d45d8ae84046ba8843eb3ba4260, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_instakill: 0
_playerEnter: _playerEnter:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []

View File

@ -1,100 +1,5 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &1157356545022895102
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3284889540147964939}
- component: {fileID: 1767268791732459175}
- component: {fileID: 6231901549469343104}
- component: {fileID: 6896559390184638598}
m_Layer: 0
m_Name: Target
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3284889540147964939
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157356545022895102}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 5.47, y: -0.91722655, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6536764240838670284}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &1767268791732459175
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157356545022895102}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &6231901549469343104
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157356545022895102}
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
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: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &6896559390184638598
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1157356545022895102}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6536764240838670287 --- !u!1 &6536764240838670287
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -104,6 +9,10 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 6536764240838670284} - component: {fileID: 6536764240838670284}
- component: {fileID: 2136135615572265879}
- component: {fileID: 1541764264070722539}
- component: {fileID: 8972538804980000285}
- component: {fileID: 8803048650719271688}
m_Layer: 0 m_Layer: 0
m_Name: RollingBoulder m_Name: RollingBoulder
m_TagString: Untagged m_TagString: Untagged
@ -123,11 +32,130 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 6536764241329740425} - {fileID: 6536764241329740425}
- {fileID: 6536764242362416353} - {fileID: 8266553266722004867}
- {fileID: 3284889540147964939}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2136135615572265879
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764240838670287}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bc988e5ddd582e443b8e078aa3518654, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 10
boulder: {fileID: 8266553266722004867}
objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}
path: {fileID: 1541764264070722539}
_killbox: {fileID: 6835443877287158791}
_fmodKey: event:/Environment/Traps/RockRoll
--- !u!114 &1541764264070722539
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764240838670287}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8e5ac92bc18f545cc84cd886ece82b4d, type: 3}
m_Name:
m_EditorClassIdentifier:
editorData:
_bezierPath:
points:
- {x: -3.2283854, y: 2.6214635, z: 2.0776966}
- {x: -2.7079039, y: 2.3347855, z: 2.069158}
- {x: 3.7415195, y: 0.35677335, z: 0.15596198}
- {x: 4.288009, y: 0.09701155, z: 0.16044615}
- {x: 7.1124983, y: -2.2351835, z: 0.055721287}
- {x: 9.683243, y: -6.328054, z: -0.13787511}
- {x: 9.839133, y: -7.5708, z: -0.07151031}
- {x: 14.4230175, y: -7.5299635, z: 0.04097652}
- {x: 30.9378, y: -7.229335, z: -0.05710648}
- {x: 35.12251, y: -7.196227, z: -0.049851887}
isClosed: 0
space: 0
controlMode: 2
autoControlLength: 0.3
boundsUpToDate: 0
bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
perAnchorNormalsAngle:
- 0
- 0
- 0
- 0
globalNormalsAngle: 0
flipNormals: 0
vertexPathUpToDate: 0
vertexPathMaxAngleError: 0.3
vertexPathMinVertexSpacing: 0.01
showTransformTool: 1
showPathBounds: 0
showPerSegmentBounds: 0
displayAnchorPoints: 1
displayControlPoints: 1
bezierHandleScale: 1
globalDisplaySettingsFoldout: 0
keepConstantHandleSize: 0
showNormalsInVertexMode: 0
showBezierPathInVertexMode: 0
showDisplayOptions: 0
showPathOptions: 1
showVertexPathDisplayOptions: 0
showVertexPathOptions: 1
showNormals: 0
showNormalsHelpInfo: 0
tabIndex: 0
initialized: 1
--- !u!65 &8972538804980000285
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764240838670287}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &8803048650719271688
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764240838670287}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0a5de09a27d949d4db67034f55c57e6b, type: 3}
m_Name:
m_EditorClassIdentifier:
_event: {fileID: 11400000, guid: 6e31084a96bb93a44a85563a6208d0da, type: 2}
_response:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 2136135615572265879}
m_TargetAssemblyTypeName: RollingBoulder, Assembly-CSharp
m_MethodName: Reset
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &6536764241329740421 --- !u!1 &6536764241329740421
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -235,11 +263,7 @@ GameObject:
- component: {fileID: 6536764242362416353} - component: {fileID: 6536764242362416353}
- component: {fileID: 6536764242362416352} - component: {fileID: 6536764242362416352}
- component: {fileID: 6536764242362416355} - component: {fileID: 6536764242362416355}
- component: {fileID: 6536764242362416354} - component: {fileID: 4053651212999538503}
- component: {fileID: 6536764242362416358}
- component: {fileID: 6536764242362416359}
- component: {fileID: 6536764242362416356}
- component: {fileID: 8693320603023675547}
m_Layer: 0 m_Layer: 0
m_Name: Sphere m_Name: Sphere
m_TagString: Untagged m_TagString: Untagged
@ -255,11 +279,11 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764242362416381} m_GameObject: {fileID: 6536764242362416381}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -2.5, y: 3.5827737, z: 0} m_LocalPosition: {x: 0, y: 1.125, z: 0}
m_LocalScale: {x: 2.1579, y: 2.1579, z: 2.1579} m_LocalScale: {x: 2.1579, y: 2.1579, z: 2.1579}
m_Children: [] m_Children: []
m_Father: {fileID: 6536764240838670284} m_Father: {fileID: 8266553266722004867}
m_RootOrder: 1 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6536764242362416352 --- !u!33 &6536764242362416352
MeshFilter: MeshFilter:
@ -310,7 +334,7 @@ MeshRenderer:
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0} m_AdditionalVertexStreams: {fileID: 0}
--- !u!135 &6536764242362416354 --- !u!135 &4053651212999538503
SphereCollider: SphereCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -322,61 +346,125 @@ SphereCollider:
m_Enabled: 1 m_Enabled: 1
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.5 m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0} m_Center: {x: 0, y: 0.00000166893, z: -0.000015258789}
--- !u!54 &6536764242362416358 --- !u!1 &7507496683005173499
Rigidbody: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764242362416381} serializedVersion: 6
m_Component:
- component: {fileID: 8266553266722004867}
m_Layer: 0
m_Name: Boulder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8266553266722004867
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7507496683005173499}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.228386, y: 2.6214638, z: 2.0776968}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6536764242362416353}
- {fileID: 4841402156874423386}
m_Father: {fileID: 6536764240838670284}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &7072774644908973023
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Mass: 1 m_Modification:
m_Drag: 0 m_TransformParent: {fileID: 8266553266722004867}
m_AngularDrag: 0.05 m_Modifications:
m_UseGravity: 0 - target: {fileID: 1235410945164343452, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
m_IsKinematic: 0 propertyPath: m_Name
m_Interpolate: 0 value: Killbox
m_Constraints: 0 objectReference: {fileID: 0}
m_CollisionDetection: 0 - target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
--- !u!114 &6536764242362416359 propertyPath: m_RootOrder
MonoBehaviour: value: 1
m_ObjectHideFlags: 0 objectReference: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0} - target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
m_PrefabInstance: {fileID: 0} propertyPath: m_LocalScale.x
value: 1.9587
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalScale.y
value: 1.9587
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalScale.z
value: 1.9587
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalPosition.y
value: 1.281
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4394339977511682008, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
propertyPath: _instakill
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
--- !u!4 &4841402156874423386 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2384540058465011589, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
m_PrefabInstance: {fileID: 7072774644908973023}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764242362416381} --- !u!114 &6835443877287158791 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4394339977511682008, guid: 356b55083085cda4c9f881946368d5bc, type: 3}
m_PrefabInstance: {fileID: 7072774644908973023}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bc988e5ddd582e443b8e078aa3518654, type: 3} m_Script: {fileID: 11500000, guid: 057a6d45d8ae84046ba8843eb3ba4260, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
waitToDestroy: 10
--- !u!65 &6536764242362416356
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764242362416381}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1.3}
m_Center: {x: 4.1, y: -1.6, z: 0.03}
--- !u!114 &8693320603023675547
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6536764242362416381}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 364f9139f6e39a244a53d33f7eca4c65, type: 3}
m_Name:
m_EditorClassIdentifier:
speed: 2
target: {fileID: 1157356545022895102}
objectTimeScale: {fileID: 11400000, guid: 9b68e167db44c0c42837e9a679da964e, type: 2}

View File

@ -1003,6 +1003,18 @@ PrefabInstance:
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 48 value: 48
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1618227772145015255, guid: 2d949926f63a2554584336b07085202b, type: 3}
propertyPath: editorData.tabIndex
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1618227772145015255, guid: 2d949926f63a2554584336b07085202b, type: 3}
propertyPath: editorData.vertexPathUpToDate
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1618227772145015255, guid: 2d949926f63a2554584336b07085202b, type: 3}
propertyPath: editorData.globalDisplaySettingsFoldout
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1659696020310685325, guid: 2d949926f63a2554584336b07085202b, type: 3} - target: {fileID: 1659696020310685325, guid: 2d949926f63a2554584336b07085202b, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 84 value: 84
@ -1359,6 +1371,10 @@ PrefabInstance:
propertyPath: m_Lightmapping propertyPath: m_Lightmapping
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 6460180061207074526, guid: 2d949926f63a2554584336b07085202b, type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6597549159420937650, guid: 2d949926f63a2554584336b07085202b, type: 3} - target: {fileID: 6597549159420937650, guid: 2d949926f63a2554584336b07085202b, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 76 value: 76
@ -1722,19 +1738,19 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 0.09021827 value: 0.09021823
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0.0062064203 value: 0.006206425
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0.801334 value: 0.8013341
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} - target: {fileID: 4676633832789495666, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0.5913425 value: 0.59134245
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3} - target: {fileID: 4676633832858914731, guid: 8a918f60d084fbe468bf3b2c0a14fb52, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x

View File

@ -1,17 +1,30 @@
using System;
using Ktyl.Util; using Ktyl.Util;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using PathCreation;
using UnityEngine; using UnityEngine;
using UnityEngine.Animations.Rigging;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class RollingBoulder : MonoBehaviour public class RollingBoulder : MonoBehaviour
{ {
Rigidbody rb; // how long it takes to travel the length of the path
// Float for time in seconds to wait to destroy the arrow on contact with any other gameobject that is no the player. [SerializeField] private float speed;
[SerializeField] private float waitToDestroy; [SerializeField] private Transform boulder;
[SerializeField] private SerialFloat objectTimeScale;
[SerializeField] private PathCreator path;
[SerializeField] private Killbox _killbox;
[SerializeField] private string _fmodKey;
private void Start() private bool _triggered = false;
private GameObject _endBoulder;
private void Update()
{ {
rb = GetComponent<Rigidbody>(); _killbox.gameObject.SetActive(objectTimeScale > 0.5f);
} }
private void OnTriggerEnter(Collider other) private void OnTriggerEnter(Collider other)
@ -19,36 +32,77 @@ public class RollingBoulder : MonoBehaviour
// Checks to make sure other collider is the Player using tag. // Checks to make sure other collider is the Player using tag.
if (other.gameObject.CompareTag("Player")) if (other.gameObject.CompareTag("Player"))
{ {
Mover mover = Trigger();
gameObject.GetComponent<Mover>();
mover.enabled = true;
StartCoroutine(DestoryBoulder());
} }
} }
private void OnCollisionEnter(Collision collision) public void Trigger()
{ {
if (collision.gameObject.TryGetComponent(out PlayerDeath playerDeath)) if (_triggered) return;
{
// Start Respawn coroutine. FMODUnity.RuntimeManager.PlayOneShot(_fmodKey);
playerDeath.Respawn();
// Destroy arrow on contact with player. StartCoroutine(RollingStone());
Destroy(gameObject);
}
/*
else
{
// If boulder makes contact with any other gameobject start DestroyBoulder corountine.
StartCoroutine(DestoryBoulder());
}
*/
} }
public IEnumerator DestoryBoulder() private IEnumerator RollingStone()
{ {
// set boulder velocity to zero wait for destory time and then destory the boulder. _triggered = true;
rb.velocity = Vector3.zero;
yield return new WaitForSeconds(waitToDestroy); var d = 0f;
Destroy(gameObject); var pathLength = path.path.length;
while (_triggered && d < pathLength)
{
d += Time.deltaTime * objectTimeScale * speed;
var pos = path.path.GetPointAtDistance(d);
boulder.transform.position = pos;
yield return null;
}
if (_triggered)
{
boulder.position = path.path.GetPointAtTime(0.999f);
}
}
public void Reset()
{
boulder.transform.position = path.path.GetPointAtTime(0);
_triggered = false;
} }
} }
#if UNITY_EDITOR
[CustomEditor(typeof(RollingBoulder))]
public class RollingBoulderEditor : Editor
{
private RollingBoulder _data;
private void OnEnable()
{
_data = target as RollingBoulder;
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (!Application.isPlaying) return;
if (GUILayout.Button("Trigger"))
{
_data.Trigger();
}
if (GUILayout.Button("Reset"))
{
_data.Reset();
}
}
}
#endif