diff --git a/.DS_Store b/.DS_Store index 741d38f..5ea5ff8 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/302/.DS_Store b/302/.DS_Store index ece448a..c366c38 100644 Binary files a/302/.DS_Store and b/302/.DS_Store differ diff --git a/302/Assets/.DS_Store b/302/Assets/.DS_Store index 3306e6c..65853fd 100644 Binary files a/302/Assets/.DS_Store and b/302/Assets/.DS_Store differ diff --git a/302/Assets/Course Library/.DS_Store b/302/Assets/Course Library/.DS_Store index 916d458..9a9a9ab 100644 Binary files a/302/Assets/Course Library/.DS_Store and b/302/Assets/Course Library/.DS_Store differ diff --git a/302/Assets/Course Library/Anomalies/.DS_Store b/302/Assets/Course Library/Anomalies/.DS_Store index c835159..26914f4 100644 Binary files a/302/Assets/Course Library/Anomalies/.DS_Store and b/302/Assets/Course Library/Anomalies/.DS_Store differ diff --git a/302/Assets/Course Library/Anomalies/Anomaly30/.DS_Store b/302/Assets/Course Library/Anomalies/Anomaly30/.DS_Store new file mode 100644 index 0000000..b6e0bd8 Binary files /dev/null and b/302/Assets/Course Library/Anomalies/Anomaly30/.DS_Store differ diff --git a/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30.meta b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30.meta index 9cf034b..54513e3 100644 --- a/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30.meta +++ b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 91cd0b8a989b74b7eafaeaf30573bb67 +guid: 12fa2d70c60444254b87b63b7e013cd8 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/thunder_background.mp4 b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/thunder_background.mp4 new file mode 100644 index 0000000..79fecc4 Binary files /dev/null and b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/thunder_background.mp4 differ diff --git a/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/thunder_background.mp4.meta b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/thunder_background.mp4.meta new file mode 100644 index 0000000..82661c6 --- /dev/null +++ b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/thunder_background.mp4.meta @@ -0,0 +1,18 @@ +fileFormatVersion: 2 +guid: 32e8c968fe9984395bd87ed148cf372a +VideoClipImporter: + externalObjects: {} + serializedVersion: 2 + frameRange: 0 + startFrame: -1 + endFrame: -1 + colorSpace: 0 + deinterlace: 0 + encodeAlpha: 0 + flipVertical: 0 + flipHorizontal: 0 + importAudio: 1 + targetSettings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/window_opening.fbx b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/window_opening.fbx new file mode 100644 index 0000000..f7d64c8 Binary files /dev/null and b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/window_opening.fbx differ diff --git a/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/window_opening.fbx.meta b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/window_opening.fbx.meta new file mode 100644 index 0000000..cf2c423 --- /dev/null +++ b/302/Assets/Course Library/Anomalies/Anomaly30/anomaly30/window_opening.fbx.meta @@ -0,0 +1,107 @@ +fileFormatVersion: 2 +guid: 48d882c59a7de49b9837915622281625 +ModelImporter: + serializedVersion: 21300 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 1 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/302/Assets/Prefabs/SpecificAnomalyManager/AnomalyManager (30).prefab b/302/Assets/Prefabs/SpecificAnomalyManager/AnomalyManager (30).prefab index 237a78e..7d7a87f 100644 --- a/302/Assets/Prefabs/SpecificAnomalyManager/AnomalyManager (30).prefab +++ b/302/Assets/Prefabs/SpecificAnomalyManager/AnomalyManager (30).prefab @@ -44,3 +44,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: fe0a0b53e5d6c48288296398894930c8, type: 3} m_Name: m_EditorClassIdentifier: + windows: [] + videoClip: {fileID: 32900000, guid: 32e8c968fe9984395bd87ed148cf372a, type: 3} + audioClip: {fileID: 8300000, guid: 72a6edc9459013144a10ef25395a47bd, type: 3} + openingSound: {fileID: 8300000, guid: 4c7fa0287ccd2464eb897655b786f4c3, type: 3} + closingSound: {fileID: 8300000, guid: 59c5055755f4c449faf7ab540e82203e, type: 3} + isWindowsOpening: 1 diff --git a/302/Assets/Scenes/DefaultGameScene.unity b/302/Assets/Scenes/DefaultGameScene.unity index 0d48999..8e4dff5 100644 --- a/302/Assets/Scenes/DefaultGameScene.unity +++ b/302/Assets/Scenes/DefaultGameScene.unity @@ -8580,7 +8580,7 @@ GameObject: m_Component: - component: {fileID: 405066976} m_Layer: 0 - m_Name: SitGrils + m_Name: SitGirls m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -10735,6 +10735,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 500380463} m_PrefabAsset: {fileID: 0} +--- !u!1 &510057880 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7478885891694655100, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} + m_PrefabInstance: {fileID: 2093457132} + m_PrefabAsset: {fileID: 0} --- !u!1001 &515213778 PrefabInstance: m_ObjectHideFlags: 0 @@ -11191,6 +11196,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 524454693} m_PrefabAsset: {fileID: 0} +--- !u!1 &541437458 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5959471144119029934, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} + m_PrefabInstance: {fileID: 1983020637} + m_PrefabAsset: {fileID: 0} --- !u!1001 &552901641 PrefabInstance: m_ObjectHideFlags: 0 @@ -13156,6 +13166,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 0bfae6ced1c6045458b9f634e638f34c, type: 3} m_PrefabInstance: {fileID: 610809542} m_PrefabAsset: {fileID: 0} +--- !u!1 &611344060 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7478885891694655100, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} + m_PrefabInstance: {fileID: 1480044169} + m_PrefabAsset: {fileID: 0} --- !u!1001 &611587569 PrefabInstance: m_ObjectHideFlags: 0 @@ -21284,6 +21299,10 @@ PrefabInstance: propertyPath: m_Name value: sit_boy_student_middlehair (1) objectReference: {fileID: 0} + - target: {fileID: 5959471144119029934, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} + propertyPath: m_TagString + value: floatable + objectReference: {fileID: 0} - target: {fileID: 6485073249332333076, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} propertyPath: m_RootOrder value: 4 @@ -21348,6 +21367,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 956358323} + - component: {fileID: 956358324} m_Layer: 0 m_Name: WallLeft m_TagString: Untagged @@ -21376,6 +21396,19 @@ Transform: m_Father: {fileID: 344747221} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &956358324 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 956358322} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 47.01239, y: 13.635007, z: 2.0497208} + m_Center: {x: -3.854248, y: 5.622643, z: 17.766048} --- !u!1001 &958799144 PrefabInstance: m_ObjectHideFlags: 0 @@ -22389,6 +22422,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 995690445} m_PrefabAsset: {fileID: 0} +--- !u!1 &996476360 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 565b4078e9cb64efc98e02bf2698c7c2, type: 3} + m_PrefabInstance: {fileID: 1967488381} + m_PrefabAsset: {fileID: 0} --- !u!1001 &997829928 PrefabInstance: m_ObjectHideFlags: 0 @@ -23882,8 +23920,26 @@ BoxCollider: m_IsTrigger: 0 m_Enabled: 1 serializedVersion: 2 - m_Size: {x: 46.75, y: 5.077183, z: 35.593533} - m_Center: {x: -4.1, y: -2.561228, z: 0.79449654} + m_Size: {x: 46.75, y: 10.00633, z: 35.593533} + m_Center: {x: -4.1000004, y: -5.025802, z: 0.79449654} +--- !u!1 &1089666521 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 44e5f88f726a94bf287e348e1684c794, type: 3} + m_PrefabInstance: {fileID: 554526890} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1089666524 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1089666521} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.1617906, y: 0.014728563, z: 0.21080396} + m_Center: {x: 0.0014954747, y: -0.0033854984, z: 0.000000007947286} --- !u!1001 &1103387605 PrefabInstance: m_ObjectHideFlags: 0 @@ -28804,6 +28860,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 1298059043} m_PrefabAsset: {fileID: 0} +--- !u!1 &1299434062 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 1cee961446b444ed8993bf202e9deeb1, type: 3} + m_PrefabInstance: {fileID: 2026332745} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1302467848 PrefabInstance: m_ObjectHideFlags: 0 @@ -28952,6 +29013,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 1306988535} m_PrefabAsset: {fileID: 0} +--- !u!1 &1307321205 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: c6a9d5739aa8a4ef89786317c6058cc0, type: 3} + m_PrefabInstance: {fileID: 1383604116} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1308433884 PrefabInstance: m_ObjectHideFlags: 0 @@ -29035,6 +29101,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1310584715} + - component: {fileID: 1310584716} m_Layer: 0 m_Name: WallFront m_TagString: Untagged @@ -29063,6 +29130,19 @@ Transform: m_Father: {fileID: 344747221} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1310584716 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1310584714} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1.3001842, y: 12.754981, z: 34.384674} + m_Center: {x: 18.734043, y: 6.226649, z: 1.0050926} --- !u!1001 &1310799806 PrefabInstance: m_ObjectHideFlags: 0 @@ -29375,6 +29455,29 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 1320513853} m_PrefabAsset: {fileID: 0} +--- !u!1 &1321471703 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5959471144119029934, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} + m_PrefabInstance: {fileID: 951219930} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1321471704 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1321471703} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.7342931, y: 1.3438474, z: 1.0591031} + m_Center: {x: 0.0040245056, y: 1.1727033, z: 0.02955166} +--- !u!1 &1323044786 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 7478885891694655100, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} + m_PrefabInstance: {fileID: 2073342873} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1323675347 PrefabInstance: m_ObjectHideFlags: 0 @@ -30839,6 +30942,19 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c6a9d5739aa8a4ef89786317c6058cc0, type: 3} m_PrefabInstance: {fileID: 1383604116} m_PrefabAsset: {fileID: 0} +--- !u!65 &1383604120 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307321205} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.0069350805, y: 0.0406475, z: 0.13540304} + m_Center: {x: 0.0014195445, y: 0.0011265898, z: 0} --- !u!1001 &1397042809 PrefabInstance: m_ObjectHideFlags: 0 @@ -32519,6 +32635,24 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 1476114191} m_PrefabAsset: {fileID: 0} +--- !u!1 &1476288279 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 12de81f0b40f54f13bcc99b854a8286a, type: 3} + m_PrefabInstance: {fileID: 1436602646} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1476288282 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1476288279} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.026420152, y: 0.039796844, z: 0.13799092} + m_Center: {x: -0.0028516112, y: 0.0027466344, z: 0} --- !u!1001 &1480044169 PrefabInstance: m_ObjectHideFlags: 0 @@ -32530,6 +32664,10 @@ PrefabInstance: propertyPath: m_Name value: sit_boy_student_mohikan objectReference: {fileID: 0} + - target: {fileID: 7478885891694655100, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} + propertyPath: m_TagString + value: floatable + objectReference: {fileID: 0} - target: {fileID: 7818679666940816582, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} propertyPath: m_RootOrder value: 0 @@ -32593,6 +32731,19 @@ Transform: m_CorrespondingSourceObject: {fileID: 7818679666940816582, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} m_PrefabInstance: {fileID: 1480044169} m_PrefabAsset: {fileID: 0} +--- !u!65 &1480044171 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 611344060} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.65986097, y: 1.3960453, z: 0.8238131} + m_Center: {x: -0.013808818, y: 1.2155299, z: 0.014832954} --- !u!1001 &1481598551 PrefabInstance: m_ObjectHideFlags: 0 @@ -33419,6 +33570,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1522936514} + - component: {fileID: 1522936515} m_Layer: 0 m_Name: ceiling m_TagString: Untagged @@ -33445,6 +33597,19 @@ Transform: m_Father: {fileID: 344747221} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1522936515 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1522936513} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 47.32457, y: 5.0352707, z: 34.74301} + m_Center: {x: -35.712097, y: 7.2370625, z: 3.8180037} --- !u!1001 &1523394264 PrefabInstance: m_ObjectHideFlags: 0 @@ -33456,6 +33621,10 @@ PrefabInstance: propertyPath: m_Name value: sit_boy_student_middlehair objectReference: {fileID: 0} + - target: {fileID: 5959471144119029934, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} + propertyPath: m_TagString + value: floatable + objectReference: {fileID: 0} - target: {fileID: 6485073249332333076, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} propertyPath: m_RootOrder value: 3 @@ -33781,6 +33950,24 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8452d6febdb74d3baa023ccec6ad5d2, type: 3} m_PrefabInstance: {fileID: 1555821849} m_PrefabAsset: {fileID: 0} +--- !u!1 &1559563270 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 215dc3fb20ea4439b884ba0120103021, type: 3} + m_PrefabInstance: {fileID: 1185403349} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1559563273 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1559563270} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.03509348, y: 0.024665697, z: 0.12539476} + m_Center: {x: 0.001568737, y: 0.00081416254, z: 0} --- !u!1001 &1561725255 PrefabInstance: m_ObjectHideFlags: 0 @@ -33998,7 +34185,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7236329420339151181, guid: 2ad42fc20dee64e4ca84470ffa3fb42e, type: 3} propertyPath: m_LocalPosition.z - value: -2.9699998 + value: -2.94 objectReference: {fileID: 0} - target: {fileID: 7236329420339151181, guid: 2ad42fc20dee64e4ca84470ffa3fb42e, type: 3} propertyPath: m_LocalRotation.w @@ -35297,6 +35484,24 @@ Transform: m_CorrespondingSourceObject: {fileID: 1809372938388778512, guid: 474138867ca9be144953fa0ca636b7c9, type: 3} m_PrefabInstance: {fileID: 1659478462} m_PrefabAsset: {fileID: 0} +--- !u!1 &1660232796 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5959471144119029934, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} + m_PrefabInstance: {fileID: 1523394264} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1660232797 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1660232796} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.73340565, y: 1.3519866, z: 1.0516385} + m_Center: {x: -0.004587173, y: 1.1882068, z: 0.047950257} --- !u!1001 &1671245536 PrefabInstance: m_ObjectHideFlags: 0 @@ -35391,6 +35596,24 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 91fc60accc0df4ef685f10f84a45923e, type: 3} m_PrefabInstance: {fileID: 1671245536} m_PrefabAsset: {fileID: 0} +--- !u!1 &1675256934 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: fd767fe10a8c14c998f585458f438e70, type: 3} + m_PrefabInstance: {fileID: 1412558968} + m_PrefabAsset: {fileID: 0} +--- !u!65 &1675256937 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1675256934} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.03635351, y: 0.028243784, z: 0.12539476} + m_Center: {x: 0.0021987641, y: 0.0014458442, z: 0} --- !u!1 &1675446298 GameObject: m_ObjectHideFlags: 0 @@ -42822,8 +43045,8 @@ MonoBehaviour: - {fileID: 5650449145146738954, guid: 11a50fb479ce40a4698c9b8f9816f567, type: 3} - {fileID: 3233071982878084982, guid: 5156428cd2b781d4dabf6a30befa7685, type: 3} - {fileID: 5605359256125054964, guid: 48c8f10abe45bef4098efae902701f34, type: 3} - checkSpecificAnomaly: 0 - SpecificAnomalyNum: 21 + checkSpecificAnomaly: 1 + SpecificAnomalyNum: 30 currentAnomalyInstance: {fileID: 8678062959089499939, guid: 6aadfcd777444a24180cf51012c6e89c, type: 3} --- !u!4 &1964216256 Transform: @@ -43076,6 +43299,19 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 565b4078e9cb64efc98e02bf2698c7c2, type: 3} m_PrefabInstance: {fileID: 1967488381} m_PrefabAsset: {fileID: 0} +--- !u!65 &1967488385 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 996476360} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.1541521, y: 0.017599983, z: 0.13114165} + m_Center: {x: -0.0014941025, y: -0.004821207, z: -0.000000009888056} --- !u!1001 &1975618915 PrefabInstance: m_ObjectHideFlags: 0 @@ -43161,6 +43397,10 @@ PrefabInstance: propertyPath: m_Name value: sit_boy_student_middlehair (2) objectReference: {fileID: 0} + - target: {fileID: 5959471144119029934, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} + propertyPath: m_TagString + value: floatable + objectReference: {fileID: 0} - target: {fileID: 6485073249332333076, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} propertyPath: m_RootOrder value: 5 @@ -43216,6 +43456,19 @@ Transform: m_CorrespondingSourceObject: {fileID: 6485073249332333076, guid: b49efed64fd3d8d439cfd1de3a9808f5, type: 3} m_PrefabInstance: {fileID: 1983020637} m_PrefabAsset: {fileID: 0} +--- !u!65 &1983020639 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 541437458} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.6896411, y: 1.3924286, z: 1.0847114} + m_Center: {x: 0.012613674, y: 1.1833099, z: 0.04235577} --- !u!1001 &1985929743 PrefabInstance: m_ObjectHideFlags: 0 @@ -44469,6 +44722,19 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 1cee961446b444ed8993bf202e9deeb1, type: 3} m_PrefabInstance: {fileID: 2026332745} m_PrefabAsset: {fileID: 0} +--- !u!65 &2026332749 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1299434062} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.00862152, y: 0.3034231, z: 0.13540304} + m_Center: {x: 0.002262764, y: -0.001183424, z: 0} --- !u!1 &2028307667 GameObject: m_ObjectHideFlags: 0 @@ -45415,6 +45681,10 @@ PrefabInstance: propertyPath: m_Name value: sit_boy_student_mohikan (2) objectReference: {fileID: 0} + - target: {fileID: 7478885891694655100, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} + propertyPath: m_TagString + value: floatable + objectReference: {fileID: 0} - target: {fileID: 7818679666940816582, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} propertyPath: m_RootOrder value: 2 @@ -45478,6 +45748,19 @@ Transform: m_CorrespondingSourceObject: {fileID: 7818679666940816582, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} m_PrefabInstance: {fileID: 2073342873} m_PrefabAsset: {fileID: 0} +--- !u!65 &2073342875 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1323044786} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.6404688, y: 1.3727473, z: 0.8700054} + m_Center: {x: 0.0029548826, y: 1.2061172, z: -0.021671088} --- !u!1001 &2082191109 PrefabInstance: m_ObjectHideFlags: 0 @@ -45769,6 +46052,10 @@ PrefabInstance: propertyPath: m_Name value: sit_boy_student_mohikan (1) objectReference: {fileID: 0} + - target: {fileID: 7478885891694655100, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} + propertyPath: m_TagString + value: floatable + objectReference: {fileID: 0} - target: {fileID: 7818679666940816582, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} propertyPath: m_RootOrder value: 1 @@ -45832,6 +46119,19 @@ Transform: m_CorrespondingSourceObject: {fileID: 7818679666940816582, guid: 4d46f98ccb1d8ad49b2d916d1094b33e, type: 3} m_PrefabInstance: {fileID: 2093457132} m_PrefabAsset: {fileID: 0} +--- !u!65 &2093457134 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 510057880} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 0.74605656, y: 1.3811848, z: 0.846585} + m_Center: {x: -0.00851817, y: 1.2019067, z: -0.010222244} --- !u!1001 &2093682517 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Manager.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Manager.cs index 5541258..a2e119a 100644 --- a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Manager.cs +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30Manager.cs @@ -1,18 +1,223 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; +using System.Collections; +using UnityEngine.Video; public class Anomaly30Manager : MonoBehaviour { - // Start is called before the first frame update + public GameObject[] windows; // Array to hold window objects + private GameObject player; + private GameManager gameManager; // Reference to GameManager + private Camera mainCamera; // Reference to the Main Camera + public VideoClip videoClip; // Thunderstorm video + public AudioClip audioClip; // Thunderstorm MP3 + public AudioClip openingSound; // Opening sound for windows + public AudioClip closingSound; // Closing sound for windows + private Anomaly30_thunderstorm thunderstorm; // Thunderstorm handler + + private float intervalMin = 2f; // Minimum interval between script application + private float intervalMax = 5f; // Maximum interval between script application + private bool stopAnomaly = false; // Flag to stop attaching scripts + private float startDelay = 2f; // Delay before starting the anomaly + public bool isWindowsOpening = true; // Boolean to track if windows are opening + void Start() { - + // Find GameManager, Player, and Main Camera + gameManager = GameObject.Find("GameManager")?.GetComponent(); + if (gameManager == null) + { + Debug.LogError("GameManager not found or missing GameManager component."); + return; + } + + player = GameObject.Find("Player"); + if (player == null) + { + Debug.LogError("Player object not found."); + return; + } + + mainCamera = Camera.main; + if (mainCamera == null) + { + Debug.LogError("Main Camera not found."); + return; + } + + // Locate the windows parent object + Transform windowsParent = GameObject.Find("Classroom/WallLeft/windows")?.transform; + if (windowsParent == null) + { + Debug.LogError("Windows parent object not found: Classroom/WallLeft/windows"); + return; + } + + // Get all child objects of the "windows" parent + windows = new GameObject[10]; + for (int i = 0; i < 10; i++) + { + windows[i] = windowsParent.GetChild(i + 2).gameObject; // Child indices start at 2 for window_001 (3) + if (windows[i] == null) + { + Debug.LogError($"Window object not found at index {i + 2} under Classroom/WallLeft/windows."); + } + } + + // Create the thunderstorm screen + thunderstorm = gameObject.AddComponent(); + thunderstorm.videoClip = videoClip; + thunderstorm.audioClip = audioClip; + thunderstorm.screenPosition = new Vector3(-2.51f, 4.72f, 18.91f); + thunderstorm.screenScale = new Vector3(46.9397f, 10.97118f, 1.538f); + thunderstorm.CreateThunderstormScreen(); + + // Start the coroutine to apply scripts and colliders + StartCoroutine(ApplyAnomalyWindowScriptsAndCollider()); + + // Start a timer to end the anomaly after 20 seconds + StartCoroutine(EndWindowsOpeningAfterTime(20f)); + } + + private IEnumerator ApplyAnomalyWindowScriptsAndCollider() + { + yield return new WaitForSeconds(startDelay); + + while (!stopAnomaly) + { + float interval = Random.Range(intervalMin, intervalMax); + int randomIndex = Random.Range(0, windows.Length); + + GameObject randomWindow = windows[randomIndex]; + Transform antaTransform = randomWindow.transform.Find("window/Anta.003"); + if (antaTransform != null) + { + GameObject anta = antaTransform.gameObject; + anta.layer = 3; + + // Skip if the Anomaly30_window script is already attached + if (anta.GetComponent() != null) + { + Debug.Log($"Script already attached to {anta.name}, skipping."); + yield return new WaitForSeconds(interval); + continue; + } + + // Add a BoxCollider if not already present + if (anta.GetComponent() == null) + { + BoxCollider boxCollider = anta.AddComponent(); + boxCollider.isTrigger = true; // Set to trigger if required + Debug.Log($"BoxCollider added to {anta.name}"); + } + + // Add Anomaly30_window component and assign sounds + Anomaly30_window windowScript = anta.AddComponent(); + windowScript.openingSound = openingSound; + windowScript.closingSound = closingSound; + } + else + { + Debug.LogWarning($"Anta.003 not found under {randomWindow.name}"); + } + + yield return new WaitForSeconds(interval); + } + } + + private IEnumerator EndWindowsOpeningAfterTime(float time) + { + yield return new WaitForSeconds(time); + + isWindowsOpening = false; + StopAnomaly(); + + if (gameManager != null) + { + gameManager.SetStageClear(); + } + + // Destroy the thunderstorm screen + thunderstorm.DestroyThunderstormScreen(); + + // Close all windows with the Anomaly30_window script attached + CloseAllWindows(); + } + + private void CloseAllWindows() + { + foreach (GameObject window in windows) + { + Transform antaTransform = window.transform.Find("window/Anta.003"); + if (antaTransform != null) + { + Anomaly30_window windowScript = antaTransform.GetComponent(); + if (windowScript != null) + { + windowScript.CloseWindow(); + } + } + } + + Debug.Log("All windows closed."); + } + + public void PlayerDieFromStorm(Vector3 windowPosition) + { + StopAnomaly(); + + // Rotate the camera to look at the window + mainCamera.transform.LookAt(windowPosition); + + // Remove BoxCollider from the player + BoxCollider playerCollider = player.GetComponent(); + if (playerCollider != null) + { + Destroy(playerCollider); + } + + // Move the player to z = -15 + Vector3 targetPosition = new Vector3(player.transform.position.x, player.transform.position.y, -15f); + StartCoroutine(MovePlayerToPosition(targetPosition)); + + // Call PlayerController's Sleep() method + PlayerController playerController = player.GetComponent(); + if (playerController != null) + { + playerController.Sleep(); + } + + // Wait 3 seconds before calling GameManager's Sleep() + StartCoroutine(CallGameManagerSleepAfterDelay(3f)); + } + + private IEnumerator MovePlayerToPosition(Vector3 targetPosition) + { + float duration = 1f; // Time to move the player + Vector3 initialPosition = player.transform.position; + float elapsedTime = 0f; + + while (elapsedTime < duration) + { + player.transform.position = Vector3.Lerp(initialPosition, targetPosition, elapsedTime / duration); + elapsedTime += Time.deltaTime; + yield return null; + } + + player.transform.position = targetPosition; + } + + private IEnumerator CallGameManagerSleepAfterDelay(float delay) + { + yield return new WaitForSeconds(delay); + + if (gameManager != null) + { + gameManager.Sleep(); + } } - // Update is called once per frame - void Update() + public void StopAnomaly() { - + stopAnomaly = true; } } diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_thunderstorm.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_thunderstorm.cs new file mode 100644 index 0000000..a71d136 --- /dev/null +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_thunderstorm.cs @@ -0,0 +1,89 @@ +using UnityEngine; +using UnityEngine.Video; + +public class Anomaly30_thunderstorm : MonoBehaviour +{ + public VideoClip videoClip; // Assign the video clip via the manager + public AudioClip audioClip; // Assign the audio clip via the manager + public Vector3 screenPosition = new Vector3(-2.51f, 4.72f, 18.91f); // Position for the thunderstorm screen + public Vector3 screenScale = new Vector3(46.9397f, 10.97118f, 1.538f); // Scale for the thunderstorm screen + + private GameObject thunderstormScreen; // The Quad for the thunderstorm screen + private AudioSource audioSource; // AudioSource to play the thunderstorm sound + private VideoPlayer videoPlayer; // VideoPlayer to display the video + + public void CreateThunderstormScreen() + { + // Create a Quad for the thunderstorm screen + thunderstormScreen = GameObject.CreatePrimitive(PrimitiveType.Quad); + thunderstormScreen.name = "ThunderstormScreen"; + + // Set position, rotation, and scale + thunderstormScreen.transform.position = screenPosition; + thunderstormScreen.transform.eulerAngles = new Vector3(0, 0, 0); // Ensure the screen faces upright + thunderstormScreen.transform.localScale = screenScale; + + // Remove the MeshCollider (not needed for this Quad) + Destroy(thunderstormScreen.GetComponent()); + + // Set up the VideoPlayer for thunderstorm video + videoPlayer = thunderstormScreen.AddComponent(); + videoPlayer.renderMode = VideoRenderMode.MaterialOverride; + videoPlayer.targetMaterialRenderer = thunderstormScreen.GetComponent(); + videoPlayer.targetMaterialProperty = "_MainTex"; + videoPlayer.source = VideoSource.VideoClip; + videoPlayer.clip = videoClip; // Assign the video clip + videoPlayer.isLooping = true; // Set the video to loop + videoPlayer.playOnAwake = false; // Prevent immediate playback until explicitly started + + // Play the video if clip is assigned + if (videoClip != null) + { + videoPlayer.Play(); + } + else + { + Debug.LogWarning("No VideoClip assigned to the thunderstorm."); + } + + // Set up the AudioSource for thunderstorm audio + audioSource = thunderstormScreen.AddComponent(); + audioSource.clip = audioClip; // Assign the audio clip + audioSource.loop = true; // Set the audio to loop + audioSource.playOnAwake = false; // Prevent immediate playback until explicitly started + audioSource.volume = 0.7f; // Adjust the volume (0.0 to 1.0) + + // Play the audio if clip is assigned + if (audioClip != null) + { + audioSource.Play(); + } + else + { + Debug.LogWarning("No AudioClip assigned to the thunderstorm."); + } + } + + public void DestroyThunderstormScreen() + { + // Stop and remove the VideoPlayer + if (videoPlayer != null) + { + videoPlayer.Stop(); + Destroy(videoPlayer); + } + + // Stop and remove the AudioSource + if (audioSource != null) + { + audioSource.Stop(); + Destroy(audioSource); + } + + // Destroy the thunderstorm screen + if (thunderstormScreen != null) + { + Destroy(thunderstormScreen); + } + } +} diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_thunderstorm.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_thunderstorm.cs.meta new file mode 100644 index 0000000..392bb61 --- /dev/null +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_thunderstorm.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b4d58005f70064c9e91d14ae9274de8f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_window.cs b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_window.cs new file mode 100644 index 0000000..9a5589f --- /dev/null +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_window.cs @@ -0,0 +1,155 @@ +using System.Collections; +using UnityEngine; + +public class Anomaly30_window : InteractableObject, IInteractable +{ + public float swingAngle = 60f; // Maximum angle for repetitive swinging + public float soundDuration = 0.672f; // Duration of one full back-and-forth swing + public float closeDuration = 1f; // Time taken to close the window + public float anomalyDuration = 15f; // Duration after which storm effect is triggered if not interacted + + public AudioClip openingSound; // Audio clip for opening sound (looped) + public AudioClip closingSound; // Audio clip for closing sound (one-shot) + + private Quaternion initialRotation; // Initial rotation of the window + private bool isSwinging = true; // Whether the window is currently swinging + private bool hasInteracted = false; // Tracks if the window has been interacted with + private Anomaly30Manager anomalyManager; // Reference to Anomaly30Manager + private AudioSource audioSource; // Audio source for the swing sound + private float swingSpeed; // Calculated swing speed based on sound duration + + private static GameObject coroutineRunner; // Persistent object to run coroutines + + void Start() + { + anomalyManager = FindObjectOfType(); + + // Store the initial rotation of the window + initialRotation = transform.rotation; + + // Calculate swing speed (π/soundDuration for one full swing) + swingSpeed = Mathf.PI / soundDuration; + + // Set up the audio source for the opening sound + audioSource = gameObject.AddComponent(); + audioSource.clip = openingSound; // Assign the opening sound + audioSource.loop = true; // Loop the sound during swinging + audioSource.playOnAwake = false; + audioSource.volume = 0.7f; // Adjust volume if needed + audioSource.Play(); + + // Start the repetitive swinging motion + StartCoroutine(SwingWindow()); + + // Trigger the anomaly end after the set duration if not interacted + Invoke(nameof(EndAnomaly), anomalyDuration); + } + + private IEnumerator SwingWindow() + { + float elapsedTime = 0f; + + // Swinging back and forth + while (isSwinging && !hasInteracted) + { + float angle = Mathf.Sin(elapsedTime * swingSpeed) * swingAngle; // Sinusoidal motion + transform.rotation = initialRotation * Quaternion.Euler(0, 0, angle); + elapsedTime += Time.deltaTime; + yield return null; + } + } + + public void CloseWindow() + { + // Use a persistent coroutine runner to ensure completion + if (coroutineRunner == null) + { + coroutineRunner = new GameObject("CoroutineRunner"); + Object.DontDestroyOnLoad(coroutineRunner); + coroutineRunner.AddComponent(); + } + + CoroutineRunner.StartPersistentCoroutine(CloseWindowCoroutine()); + } + + private IEnumerator CloseWindowCoroutine() + { + isSwinging = false; // Stop swinging + float elapsedTime = 0f; + Quaternion currentRotation = transform.rotation; + + // Play closing sound as one-shot + if (audioSource != null && closingSound != null) + { + audioSource.Stop(); // Stop the opening sound + audioSource.PlayOneShot(closingSound); // Play the closing sound once + } + + // Gradually interpolate back to the initial rotation + while (elapsedTime < closeDuration) + { + transform.rotation = Quaternion.Slerp(currentRotation, initialRotation, elapsedTime / closeDuration); + elapsedTime += Time.deltaTime; + yield return null; + } + + // Ensure the final rotation is exactly the initial rotation + transform.rotation = initialRotation; + + Debug.Log($"Window {transform.parent.name} closed to initial rotation."); + + // Wait for 2 seconds before destruction + yield return new WaitForSeconds(2f); + Destroy(this); + } + + private void EndAnomaly() + { + if (!hasInteracted && isSwinging) + { + if (anomalyManager != null) + { + anomalyManager.PlayerDieFromStorm(transform.position); + } + } + + // Wait for 2 seconds before destruction + StartCoroutine(WaitAndDestroy(2f)); + } + + private IEnumerator WaitAndDestroy(float waitTime) + { + yield return new WaitForSeconds(waitTime); + Destroy(this); + } + + public override string GetInteractionPrompt() + { + return "Press Left Click to close the window."; + } + + public override bool CanInteract() + { + return !hasInteracted; + } + + public override void OnInteract() + { + if (hasInteracted) return; + + hasInteracted = true; + CloseWindow(); + } + + // Persistent Coroutine Runner + private class CoroutineRunner : MonoBehaviour + { + public static void StartPersistentCoroutine(IEnumerator coroutine) + { + if (coroutineRunner != null) + { + coroutineRunner.GetComponent().StartCoroutine(coroutine); + } + } + } +} diff --git a/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_window.cs.meta b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_window.cs.meta new file mode 100644 index 0000000..76bbbf6 --- /dev/null +++ b/302/Assets/Scripts/SpecificAnomalyManager/Anomaly30_window.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9fcf041c2da194b0dade294fd7468311 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/302/Assets/Sounds/01 - Thunderstorm Outside (with some rain on roof).wav b/302/Assets/Sounds/01 - Thunderstorm Outside (with some rain on roof).wav new file mode 100644 index 0000000..071d0da Binary files /dev/null and b/302/Assets/Sounds/01 - Thunderstorm Outside (with some rain on roof).wav differ diff --git a/302/Assets/Sounds/01 - Thunderstorm Outside (with some rain on roof).wav.meta b/302/Assets/Sounds/01 - Thunderstorm Outside (with some rain on roof).wav.meta new file mode 100644 index 0000000..b9c247b --- /dev/null +++ b/302/Assets/Sounds/01 - Thunderstorm Outside (with some rain on roof).wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 72a6edc9459013144a10ef25395a47bd +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/302/Assets/Sounds/window-closing-trimmed.mp3 b/302/Assets/Sounds/window-closing-trimmed.mp3 new file mode 100644 index 0000000..481c129 Binary files /dev/null and b/302/Assets/Sounds/window-closing-trimmed.mp3 differ diff --git a/302/Assets/Sounds/window-closing-trimmed.mp3.meta b/302/Assets/Sounds/window-closing-trimmed.mp3.meta new file mode 100644 index 0000000..61baa74 --- /dev/null +++ b/302/Assets/Sounds/window-closing-trimmed.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 59c5055755f4c449faf7ab540e82203e +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/302/Assets/Sounds/window-opening-trimmed.mp3 b/302/Assets/Sounds/window-opening-trimmed.mp3 new file mode 100644 index 0000000..fdbeaf5 Binary files /dev/null and b/302/Assets/Sounds/window-opening-trimmed.mp3 differ diff --git a/302/Assets/Sounds/window-opening-trimmed.mp3.meta b/302/Assets/Sounds/window-opening-trimmed.mp3.meta new file mode 100644 index 0000000..f567429 --- /dev/null +++ b/302/Assets/Sounds/window-opening-trimmed.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 4c7fa0287ccd2464eb897655b786f4c3 +AudioImporter: + externalObjects: {} + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + ambisonic: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: