From 586fa97d56d2bc93ebe2ab807335264cea7ab2d4 Mon Sep 17 00:00:00 2001 From: Novvator Date: Sun, 11 Apr 2021 23:17:49 +0100 Subject: [PATCH] Added pressure plate and secret door prefab --- game/Assets/Prefabs/PressurePlateDoor.meta | 8 + .../PressurePlateDoor/DoorParent.prefab | 148 +++++++++++++++ .../PressurePlateDoor/DoorParent.prefab.meta | 7 + .../PressurePlateDoor/PlateParent.prefab | 178 ++++++++++++++++++ .../PressurePlateDoor/PlateParent.prefab.meta | 7 + game/Assets/Scripts/PressurePlate.meta | 8 + game/Assets/Scripts/PressurePlate/Door.meta | 8 + .../PressurePlate/Door/Door.controller | 101 ++++++++++ .../PressurePlate/Door/Door.controller.meta | 8 + .../Scripts/PressurePlate/Door/DoorUp.anim | 169 +++++++++++++++++ .../PressurePlate/Door/DoorUp.anim.meta | 8 + .../Scripts/PressurePlate/Door/trash.meta | 8 + .../PressurePlate/Door/trash/Plate.prefab | 147 +++++++++++++++ .../Door/trash/Plate.prefab.meta | 7 + .../Door/trash/PressurePlate 1.prefab | 99 ++++++++++ .../Door/trash/PressurePlate 1.prefab.meta | 7 + game/Assets/Scripts/PressurePlate/PP.meta | 8 + .../Scripts/PressurePlate/PP/PPdown.anim | 169 +++++++++++++++++ .../Scripts/PressurePlate/PP/PPdown.anim.meta | 8 + .../Assets/Scripts/PressurePlate/PP/PPup.anim | 169 +++++++++++++++++ .../Scripts/PressurePlate/PP/PPup.anim.meta | 8 + .../Scripts/PressurePlate/PP/Plate.controller | 130 +++++++++++++ .../PressurePlate/PP/Plate.controller.meta | 8 + .../PressurePlate/PressurePlateScript.cs | 49 +++++ .../PressurePlate/PressurePlateScript.cs.meta | 11 ++ 25 files changed, 1478 insertions(+) create mode 100644 game/Assets/Prefabs/PressurePlateDoor.meta create mode 100644 game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab create mode 100644 game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab.meta create mode 100644 game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab create mode 100644 game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab.meta create mode 100644 game/Assets/Scripts/PressurePlate.meta create mode 100644 game/Assets/Scripts/PressurePlate/Door.meta create mode 100644 game/Assets/Scripts/PressurePlate/Door/Door.controller create mode 100644 game/Assets/Scripts/PressurePlate/Door/Door.controller.meta create mode 100644 game/Assets/Scripts/PressurePlate/Door/DoorUp.anim create mode 100644 game/Assets/Scripts/PressurePlate/Door/DoorUp.anim.meta create mode 100644 game/Assets/Scripts/PressurePlate/Door/trash.meta create mode 100644 game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab create mode 100644 game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab.meta create mode 100644 game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab create mode 100644 game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab.meta create mode 100644 game/Assets/Scripts/PressurePlate/PP.meta create mode 100644 game/Assets/Scripts/PressurePlate/PP/PPdown.anim create mode 100644 game/Assets/Scripts/PressurePlate/PP/PPdown.anim.meta create mode 100644 game/Assets/Scripts/PressurePlate/PP/PPup.anim create mode 100644 game/Assets/Scripts/PressurePlate/PP/PPup.anim.meta create mode 100644 game/Assets/Scripts/PressurePlate/PP/Plate.controller create mode 100644 game/Assets/Scripts/PressurePlate/PP/Plate.controller.meta create mode 100644 game/Assets/Scripts/PressurePlate/PressurePlateScript.cs create mode 100644 game/Assets/Scripts/PressurePlate/PressurePlateScript.cs.meta diff --git a/game/Assets/Prefabs/PressurePlateDoor.meta b/game/Assets/Prefabs/PressurePlateDoor.meta new file mode 100644 index 0000000..2f4871f --- /dev/null +++ b/game/Assets/Prefabs/PressurePlateDoor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dde3968d8bfdb62459254c8eb0b4ebd6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab b/game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab new file mode 100644 index 0000000..fea054f --- /dev/null +++ b/game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab @@ -0,0 +1,148 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4615604479551752799 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6996056622029946206} + - component: {fileID: 8602164456456231678} + - component: {fileID: 6968165722764952395} + - component: {fileID: 3376821640706513195} + - component: {fileID: 7076099413930353623} + m_Layer: 0 + m_Name: Door + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &6996056622029946206 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4615604479551752799} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.5, z: 0} + m_LocalScale: {x: 0.5, y: 3, z: 2.5} + m_Children: [] + m_Father: {fileID: 889410586990417773} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8602164456456231678 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4615604479551752799} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6968165722764952395 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4615604479551752799} + m_Enabled: 1 + 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 &3376821640706513195 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4615604479551752799} + 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!95 &7076099413930353623 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4615604479551752799} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 01bcac01af55711459628b2739f77fd0, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &7857540940252484938 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 889410586990417773} + m_Layer: 0 + m_Name: DoorParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &889410586990417773 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7857540940252484938} + 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: + - {fileID: 6996056622029946206} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab.meta b/game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab.meta new file mode 100644 index 0000000..d8b2153 --- /dev/null +++ b/game/Assets/Prefabs/PressurePlateDoor/DoorParent.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 077e7025077de9f489adff0b8094a2ae +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab b/game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab new file mode 100644 index 0000000..5f8422e --- /dev/null +++ b/game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab @@ -0,0 +1,178 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &172610034636199716 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 94786115782214957} + - component: {fileID: 8342715646309924678} + - component: {fileID: 4920942688973990148} + - component: {fileID: 7019539025838912937} + - component: {fileID: 2008516910213964938} + - component: {fileID: 5530170563008613136} + - component: {fileID: 8033591221754439421} + m_Layer: 0 + m_Name: Plate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &94786115782214957 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.125, z: 0} + m_LocalScale: {x: 1, y: 0.25, z: 1} + m_Children: [] + m_Father: {fileID: 2525007088954062234} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8342715646309924678 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &4920942688973990148 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + m_Enabled: 1 + 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 &7019539025838912937 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + 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!65 &2008516910213964938 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + 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: 1, z: 0} +--- !u!114 &5530170563008613136 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 17720070f47f28b4e8a87b8b071a79d0, type: 3} + m_Name: + m_EditorClassIdentifier: + doorDelay: 2 + pPlateAnim: {fileID: 0} + doorAnim: {fileID: 0} +--- !u!95 &8033591221754439421 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 172610034636199716} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 7dd78065809f6d54fa94e9222a68a55e, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!1 &8036033890208197765 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2525007088954062234} + m_Layer: 0 + m_Name: PlateParent + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2525007088954062234 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8036033890208197765} + 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: + - {fileID: 94786115782214957} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab.meta b/game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab.meta new file mode 100644 index 0000000..6251cd5 --- /dev/null +++ b/game/Assets/Prefabs/PressurePlateDoor/PlateParent.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 448321047f50e504cbc4586cf3eef27e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate.meta b/game/Assets/Scripts/PressurePlate.meta new file mode 100644 index 0000000..07a420b --- /dev/null +++ b/game/Assets/Scripts/PressurePlate.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 93bc95265ed44c54c9ca1ef033a5337f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/Door.meta b/game/Assets/Scripts/PressurePlate/Door.meta new file mode 100644 index 0000000..09a512b --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a4f0d712049cbb54795972e09d698e3c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/Door/Door.controller b/game/Assets/Scripts/PressurePlate/Door/Door.controller new file mode 100644 index 0000000..56a0a91 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/Door.controller @@ -0,0 +1,101 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-5507418607302417577 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 0} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &-59923427114174855 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DoorUp + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 843264e7fb4ba294a9736adeef966780, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Door + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 444737908503174047} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1107 &444737908503174047 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -59923427114174855} + m_Position: {x: 230, y: 40, z: 0} + - serializedVersion: 1 + m_State: {fileID: -5507418607302417577} + m_Position: {x: 260, y: 100, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -5507418607302417577} diff --git a/game/Assets/Scripts/PressurePlate/Door/Door.controller.meta b/game/Assets/Scripts/PressurePlate/Door/Door.controller.meta new file mode 100644 index 0000000..222cd6b --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/Door.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 01bcac01af55711459628b2739f77fd0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/Door/DoorUp.anim b/game/Assets/Scripts/PressurePlate/Door/DoorUp.anim new file mode 100644 index 0000000..0b3c747 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/DoorUp.anim @@ -0,0 +1,169 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DoorUp + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 1.5, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 2 + value: {x: 0, y: 4.5, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 2 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: 4.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 2 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/game/Assets/Scripts/PressurePlate/Door/DoorUp.anim.meta b/game/Assets/Scripts/PressurePlate/Door/DoorUp.anim.meta new file mode 100644 index 0000000..6e1642c --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/DoorUp.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 843264e7fb4ba294a9736adeef966780 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/Door/trash.meta b/game/Assets/Scripts/PressurePlate/Door/trash.meta new file mode 100644 index 0000000..ef1deca --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/trash.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9bf3b1aee4a35624fb362b0eb39aee0d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab b/game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab new file mode 100644 index 0000000..bfbc217 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab @@ -0,0 +1,147 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &824688594051287168 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 824688594051287177} + - component: {fileID: 824688594051287182} + - component: {fileID: 824688594051287183} + - component: {fileID: 824688594051287180} + - component: {fileID: 824688594051287181} + - component: {fileID: 824688594051287171} + - component: {fileID: 824688594051287170} + m_Layer: 0 + m_Name: PressurePlate + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &824688594051287177 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.125, z: 0} + m_LocalScale: {x: 1, y: 0.25, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &824688594051287182 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &824688594051287183 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + m_Enabled: 1 + 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 &824688594051287180 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + 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!95 &824688594051287181 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 83928928fbe572c4b9ce8939f51f882c, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!65 &824688594051287171 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + 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: 1, z: 0} +--- !u!114 &824688594051287170 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 824688594051287168} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 17720070f47f28b4e8a87b8b071a79d0, type: 3} + m_Name: + m_EditorClassIdentifier: + doorDelay: 2 + pPlateAnim: {fileID: 824688594051287181} + doorAnim: {fileID: 0} diff --git a/game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab.meta b/game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab.meta new file mode 100644 index 0000000..cf69b1f --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/trash/Plate.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0f9a05a61a7b0ec4c91a42bc927c5906 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab b/game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab new file mode 100644 index 0000000..7e5e6d1 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab @@ -0,0 +1,99 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2909796267397534871 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 997236398405830009} + m_Layer: 0 + m_Name: PressurePlate 1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &997236398405830009 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2909796267397534871} + 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: + - {fileID: 8418753010549425949} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &9197628802269892500 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 997236398405830009} + m_Modifications: + - target: {fileID: 824688594051287168, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_Name + value: Plate + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalPosition.y + value: 0.125 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 824688594051287181, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + propertyPath: m_Controller + value: + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} +--- !u!4 &8418753010549425949 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 824688594051287177, guid: 0f9a05a61a7b0ec4c91a42bc927c5906, type: 3} + m_PrefabInstance: {fileID: 9197628802269892500} + m_PrefabAsset: {fileID: 0} diff --git a/game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab.meta b/game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab.meta new file mode 100644 index 0000000..3f5a276 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/Door/trash/PressurePlate 1.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc2200f701ede2f499d9e964e519675b +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/PP.meta b/game/Assets/Scripts/PressurePlate/PP.meta new file mode 100644 index 0000000..15b8d79 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 091cdd3bd3163d349a238477b909d3d6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/PP/PPdown.anim b/game/Assets/Scripts/PressurePlate/PP/PPdown.anim new file mode 100644 index 0000000..263e511 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP/PPdown.anim @@ -0,0 +1,169 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PPdown + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: 0.125, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1 + value: {x: 0, y: -0.125, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.125 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: -0.125 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/game/Assets/Scripts/PressurePlate/PP/PPdown.anim.meta b/game/Assets/Scripts/PressurePlate/PP/PPdown.anim.meta new file mode 100644 index 0000000..100d84f --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP/PPdown.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 65bb274a3f8aaec4f8a553cf1226a14c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/PP/PPup.anim b/game/Assets/Scripts/PressurePlate/PP/PPup.anim new file mode 100644 index 0000000..f2fb8d7 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP/PPup.anim @@ -0,0 +1,169 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PPup + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: {x: 0, y: -0.125, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + - serializedVersion: 3 + time: 1 + value: {x: 0, y: 0.125, z: 0} + inSlope: {x: 0, y: 0, z: 0} + outSlope: {x: 0, y: 0, z: 0} + tangentMode: 0 + weightedMode: 0 + inWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + outWeight: {x: 0.33333334, y: 0.33333334, z: 0.33333334} + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + path: + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 1 + script: {fileID: 0} + typeID: 4 + customType: 0 + isPPtrCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.x + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: -0.125 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0.125 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.y + path: + classID: 4 + script: {fileID: 0} + - curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: m_LocalPosition.z + path: + classID: 4 + script: {fileID: 0} + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 1 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/game/Assets/Scripts/PressurePlate/PP/PPup.anim.meta b/game/Assets/Scripts/PressurePlate/PP/PPup.anim.meta new file mode 100644 index 0000000..0f43a44 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP/PPup.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8eefd47ca8a3bb2468dbcc601ed2a2bc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/PP/Plate.controller b/game/Assets/Scripts/PressurePlate/PP/Plate.controller new file mode 100644 index 0000000..16c452e --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP/Plate.controller @@ -0,0 +1,130 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-6688937816789547409 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PPdown + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 65bb274a3f8aaec4f8a553cf1226a14c, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1102 &-3764729839356305878 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PPup + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 8eefd47ca8a3bb2468dbcc601ed2a2bc, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Plate + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5023646390322142521} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1102 &3017362506659374337 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 0} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!1107 &5023646390322142521 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -6688937816789547409} + m_Position: {x: 200, y: 0, z: 0} + - serializedVersion: 1 + m_State: {fileID: -3764729839356305878} + m_Position: {x: 235, y: 65, z: 0} + - serializedVersion: 1 + m_State: {fileID: 3017362506659374337} + m_Position: {x: 262.71722, y: 148.9939, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 20, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: 3017362506659374337} diff --git a/game/Assets/Scripts/PressurePlate/PP/Plate.controller.meta b/game/Assets/Scripts/PressurePlate/PP/Plate.controller.meta new file mode 100644 index 0000000..86ed49f --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PP/Plate.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7dd78065809f6d54fa94e9222a68a55e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/game/Assets/Scripts/PressurePlate/PressurePlateScript.cs b/game/Assets/Scripts/PressurePlate/PressurePlateScript.cs new file mode 100644 index 0000000..48303bd --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PressurePlateScript.cs @@ -0,0 +1,49 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class PressurePlateScript : MonoBehaviour +{ + private float? triggered = null; + [SerializeField] private float doorDelay = 2.0f; + private bool opened = false; + + [SerializeField] private Animator pPlateAnim = null; + [SerializeField] private Animator doorAnim = null; + + private void OnTriggerEnter(Collider other) + { + if (other.CompareTag("Player") && !opened) + { + //pressure plate down and start trigger time + pPlateAnim.Play("PPdown", 0, 0f); + triggered = Time.time; + } + } + + private void OnTriggerExit(Collider other) + { + if(other.CompareTag("Player")) + { + if(triggered!=null && !opened) + { + triggered = null; + pPlateAnim.Play("PPup", 0, 0f); + //reset platform position + } + } + } + + private void Update() + { + var timepassed = Time.time - triggered; + + if(timepassed > doorDelay && !opened) + { + //move door + doorAnim.Play("DoorUp", 0, 0f); + opened = true; + + } + } +} \ No newline at end of file diff --git a/game/Assets/Scripts/PressurePlate/PressurePlateScript.cs.meta b/game/Assets/Scripts/PressurePlate/PressurePlateScript.cs.meta new file mode 100644 index 0000000..6b9b4f7 --- /dev/null +++ b/game/Assets/Scripts/PressurePlate/PressurePlateScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 17720070f47f28b4e8a87b8b071a79d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: