Compare commits
2 Commits
732a2577c2
...
00a433132b
| Author | SHA1 | Date | |
|---|---|---|---|
| 00a433132b | |||
| e0c93be280 |
8
Assets/Animation.meta
Normal file
8
Assets/Animation.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d841e03fe32f03b46b2e884de59d6f1e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
43
Assets/Animation/Player.controller
Normal file
43
Assets/Animation/Player.controller
Normal file
@@ -0,0 +1,43 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1107 &-4198303733874558364
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates: []
|
||||
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: 0}
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Player
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: -4198303733874558364}
|
||||
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}
|
||||
8
Assets/Animation/Player.controller.meta
Normal file
8
Assets/Animation/Player.controller.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2381a21e87c649b4bb198dfa08e35246
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/09-Slapstick-FULL-SM382.wav
Normal file
BIN
Assets/Audio/09-Slapstick-FULL-SM382.wav
Normal file
Binary file not shown.
23
Assets/Audio/09-Slapstick-FULL-SM382.wav.meta
Normal file
23
Assets/Audio/09-Slapstick-FULL-SM382.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 188d81d5d5438164bbe5a90bc22ff5d8
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/Adult-Fem_Laughter_VKT_17865.wav
Normal file
BIN
Assets/Audio/Adult-Fem_Laughter_VKT_17865.wav
Normal file
Binary file not shown.
23
Assets/Audio/Adult-Fem_Laughter_VKT_17865.wav.meta
Normal file
23
Assets/Audio/Adult-Fem_Laughter_VKT_17865.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3e6275f4b9049a4481d38ab85efd1d5
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/AirPressureRelsDie MM010201-[AudioTrimmer.com].wav
Normal file
BIN
Assets/Audio/AirPressureRelsDie MM010201-[AudioTrimmer.com].wav
Normal file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e422116591e06ff4f864539cf4086352
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/Baby-F_Crying_VKT_17361.wav
Normal file
BIN
Assets/Audio/Baby-F_Crying_VKT_17361.wav
Normal file
Binary file not shown.
23
Assets/Audio/Baby-F_Crying_VKT_17361.wav.meta
Normal file
23
Assets/Audio/Baby-F_Crying_VKT_17361.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99aba5503d10b6949bc0a94b48392457
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30b3db05cf5720444aeb29bf0fd2822e
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/HitLow IE01_38_3-[AudioTrimmer.com].wav
Normal file
BIN
Assets/Audio/HitLow IE01_38_3-[AudioTrimmer.com].wav
Normal file
Binary file not shown.
23
Assets/Audio/HitLow IE01_38_3-[AudioTrimmer.com].wav.meta
Normal file
23
Assets/Audio/HitLow IE01_38_3-[AudioTrimmer.com].wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c435e24017975524c8b66a69bbf99db5
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3fc281979327fd4ea48ab0add748e35
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/LaughterCrowd AR03_36_1.wav
Normal file
BIN
Assets/Audio/LaughterCrowd AR03_36_1.wav
Normal file
Binary file not shown.
23
Assets/Audio/LaughterCrowd AR03_36_1.wav.meta
Normal file
23
Assets/Audio/LaughterCrowd AR03_36_1.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17ef70a332408ad4191c4560ef0e88e1
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/LaughterCrowd AR03_46_2.wav
Normal file
BIN
Assets/Audio/LaughterCrowd AR03_46_2.wav
Normal file
Binary file not shown.
23
Assets/Audio/LaughterCrowd AR03_46_2.wav.meta
Normal file
23
Assets/Audio/LaughterCrowd AR03_46_2.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c1ddaff2f99dd341848b8760d8d4e7e
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/MetalBend 6106_73_6.wav
Normal file
BIN
Assets/Audio/MetalBend 6106_73_6.wav
Normal file
Binary file not shown.
23
Assets/Audio/MetalBend 6106_73_6.wav.meta
Normal file
23
Assets/Audio/MetalBend 6106_73_6.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8bf5ac5773cda74c877efec63a8b0bb
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/Old Wood Slam.wav
Normal file
BIN
Assets/Audio/Old Wood Slam.wav
Normal file
Binary file not shown.
23
Assets/Audio/Old Wood Slam.wav.meta
Normal file
23
Assets/Audio/Old Wood Slam.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d3e2c5f35d74ee747b5552d0fc607ffc
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/SwitchLightLightSw EE121701-[AudioTrimmer.com].wav
Normal file
BIN
Assets/Audio/SwitchLightLightSw EE121701-[AudioTrimmer.com].wav
Normal file
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2dae2014cf5b904da21fe7e27ccdb23
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/TvStaticLoop PE1030902.wav
Normal file
BIN
Assets/Audio/TvStaticLoop PE1030902.wav
Normal file
Binary file not shown.
23
Assets/Audio/TvStaticLoop PE1030902.wav.meta
Normal file
23
Assets/Audio/TvStaticLoop PE1030902.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d210245799c907e4a915246b4779e770
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Audio/Wood Door Knock A.wav
Normal file
BIN
Assets/Audio/Wood Door Knock A.wav
Normal file
Binary file not shown.
23
Assets/Audio/Wood Door Knock A.wav.meta
Normal file
23
Assets/Audio/Wood Door Knock A.wav.meta
Normal file
@@ -0,0 +1,23 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a2fa0d484805034b8010c35e5e296b4
|
||||
AudioImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 8
|
||||
defaultSettings:
|
||||
serializedVersion: 2
|
||||
loadType: 0
|
||||
sampleRateSetting: 0
|
||||
sampleRateOverride: 44100
|
||||
compressionFormat: 1
|
||||
quality: 1
|
||||
conversionMode: 0
|
||||
preloadAudioData: 0
|
||||
platformSettingOverrides: {}
|
||||
forceToMono: 0
|
||||
normalize: 1
|
||||
loadInBackground: 0
|
||||
ambisonic: 0
|
||||
3D: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -323,7 +323,7 @@ public partial class @InputSystem_Actions: IInputActionCollection2, IDisposable
|
||||
""id"": ""8c8e490b-c610-4785-884f-f04217b23ca4"",
|
||||
""path"": ""<Pointer>/delta"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""processors"": ""ScaleVector2(x=0.5,y=0.5)"",
|
||||
""groups"": "";Keyboard&Mouse;Touch"",
|
||||
""action"": ""Look"",
|
||||
""isComposite"": false,
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
"id": "8c8e490b-c610-4785-884f-f04217b23ca4",
|
||||
"path": "<Pointer>/delta",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"processors": "ScaleVector2(x=0.5,y=0.5)",
|
||||
"groups": ";Keyboard&Mouse;Touch",
|
||||
"action": "Look",
|
||||
"isComposite": false,
|
||||
|
||||
8
Assets/Materials.meta
Normal file
8
Assets/Materials.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 93abe560491efd648a7173ec62542a78
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
137
Assets/Materials/GroundMat.mat
Normal file
137
Assets/Materials/GroundMat.mat
Normal file
@@ -0,0 +1,137 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-4230393876331849438
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: GroundMat
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.0504973, g: 0.14150941, b: 0, a: 1}
|
||||
- _Color: {r: 0.05049728, g: 0.14150938, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
8
Assets/Materials/GroundMat.mat.meta
Normal file
8
Assets/Materials/GroundMat.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 081393fe8acedb64b928a1f5390e0d93
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
144
Assets/Materials/SkyBox.mat
Normal file
144
Assets/Materials/SkyBox.mat
Normal file
@@ -0,0 +1,144 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-886594433476612999
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: SkyBox
|
||||
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _SUNDISK_HIGH_QUALITY
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _AtmosphereThickness: 0.5
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _Exposure: 0.2
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _SunDisk: 2
|
||||
- _SunSize: 0.04
|
||||
- _SunSizeConvergence: 5
|
||||
- _Surface: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _GroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SkyTint: {r: 0.032039877, g: 0.032039877, b: 0.1509434, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
8
Assets/Materials/SkyBox.mat.meta
Normal file
8
Assets/Materials/SkyBox.mat.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eafc870316538e40be4716f274be217
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -75,15 +75,15 @@ Light:
|
||||
m_GameObject: {fileID: 6467902161508508620}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 11
|
||||
m_Type: 2
|
||||
m_Type: 0
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 5
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_Range: 3
|
||||
m_SpotAngle: 150
|
||||
m_InnerSpotAngle: 120
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 0
|
||||
m_Type: 1
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
@@ -144,7 +144,7 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_AdditionalLightsShadowResolutionTier: 0
|
||||
m_CustomShadowLayers: 0
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
|
||||
@@ -11,7 +11,7 @@ GameObject:
|
||||
- component: {fileID: 7282224757379468502}
|
||||
- component: {fileID: 5946000587220470212}
|
||||
- component: {fileID: 8924758288456708593}
|
||||
m_Layer: 0
|
||||
m_Layer: 6
|
||||
m_Name: Lightswitch
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
@@ -46,12 +46,27 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: e3725edead1a94a499bd439fab403ed0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::LightSwitch
|
||||
linkedLight: {fileID: 0}
|
||||
linkedLight:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
isLightOn: 1
|
||||
audioSource: {fileID: 1567291206409043402}
|
||||
switchClickSound: {fileID: 8300000, guid: f2dae2014cf5b904da21fe7e27ccdb23, type: 3}
|
||||
malfunctionSound: {fileID: 8300000, guid: e422116591e06ff4f864539cf4086352, type: 3}
|
||||
malfunctionChance: 0.1
|
||||
audioSource: {fileID: 0}
|
||||
switchClickSound: {fileID: 0}
|
||||
malfunctionSound: {fileID: 0}
|
||||
enableSpecialEvents: 0
|
||||
OnFirstSwitchOff:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
OnFirstSwitchOn:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
subsequentEventChance: 2
|
||||
OnRandomEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!65 &8924758288456708593
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -73,6 +88,135 @@ BoxCollider:
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 0.22346851, y: 0.25883532, z: 0.058380067}
|
||||
m_Center: {x: 0.0023065954, y: 0.0015376806, z: 0.024324834}
|
||||
--- !u!1 &8980186413118575308
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5785890124992812665}
|
||||
- component: {fileID: 1567291206409043402}
|
||||
m_Layer: 6
|
||||
m_Name: Audio Source
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5785890124992812665
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8980186413118575308}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 336824361037576561}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!82 &1567291206409043402
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8980186413118575308}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 0.2
|
||||
MaxDistance: 0.5
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!1001 &9115038950296480369
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -81,10 +225,22 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 7282224757379468502}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1373609030083132619, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5567078051838984357, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8185412126154852794, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: SM_Prop_Light_Switch_01
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8185412126154852794, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
propertyPath: m_Layer
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8850624785249653504, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
@@ -127,7 +283,10 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 8850624785249653504, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 5785890124992812665}
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 59af4971df96d4a43af2d837c0147ad7, type: 3}
|
||||
--- !u!4 &336824361037576561 stripped
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
Assets/Scenes/SampleScene/ReflectionProbe-0.exr
Normal file
BIN
Assets/Scenes/SampleScene/ReflectionProbe-0.exr
Normal file
Binary file not shown.
143
Assets/Scenes/SampleScene/ReflectionProbe-0.exr.meta
Normal file
143
Assets/Scenes/SampleScene/ReflectionProbe-0.exr.meta
Normal file
@@ -0,0 +1,143 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aff2341cd02bb1741b41894107e2dc50
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 1
|
||||
seamlessCubemap: 1
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 2
|
||||
aniso: 0
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 2
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 100
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
109
Assets/Scripts/DebugControlPanel.cs
Normal file
109
Assets/Scripts/DebugControlPanel.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
using UnityEngine;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor; // Required for the buttons to appear
|
||||
#endif
|
||||
|
||||
public class DebugControlPanel : MonoBehaviour
|
||||
{
|
||||
[Header("Target Scripts")]
|
||||
public FrontDoorEvent frontDoorScript;
|
||||
public StairWarp stairWarpScript;
|
||||
|
||||
// We don't need to drag in GameManager since it's a Singleton (GameManager.Instance)
|
||||
|
||||
[Header("Status")]
|
||||
public string lastAction = "None";
|
||||
|
||||
// --- HELPER FUNCTIONS FOR THE BUTTONS ---
|
||||
|
||||
public void TestDoorbell()
|
||||
{
|
||||
if (frontDoorScript != null)
|
||||
{
|
||||
frontDoorScript.TriggerEvent();
|
||||
lastAction = "Triggered Doorbell Sequence";
|
||||
}
|
||||
else Debug.LogError("Front Door Script not assigned!");
|
||||
}
|
||||
|
||||
public void TestNightmare()
|
||||
{
|
||||
if (GameManager.Instance != null)
|
||||
{
|
||||
GameManager.Instance.TriggerNightmareMode();
|
||||
lastAction = "Triggered Nightmare Mode";
|
||||
}
|
||||
else Debug.LogError("GameManager not found!");
|
||||
}
|
||||
|
||||
public void ForceWarp()
|
||||
{
|
||||
// Note: You must change 'WarpPlayer' to PUBLIC in StairWarp.cs for this to work
|
||||
if (stairWarpScript != null)
|
||||
{
|
||||
// We pass the player object to the warp script manually for testing
|
||||
GameObject player = GameObject.FindGameObjectWithTag("Player");
|
||||
if (player != null)
|
||||
{
|
||||
// Assuming you changed WarpPlayer to public, otherwise this line errors
|
||||
stairWarpScript.WarpPlayer(player);
|
||||
lastAction = "Forced Stair Warp";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ToggleAllLights()
|
||||
{
|
||||
if (GameManager.Instance != null)
|
||||
{
|
||||
foreach (LightSwitch sw in GameManager.Instance.allSwitches)
|
||||
{
|
||||
sw.Interact(); // Manually click every switch
|
||||
}
|
||||
lastAction = "Toggled All Lights";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- THE EDITOR MAGIC ---
|
||||
// This part tells Unity how to draw the inspector for this specific script
|
||||
#if UNITY_EDITOR
|
||||
[CustomEditor(typeof(DebugControlPanel))]
|
||||
public class DebugControlPanelEditor : Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
// Draw the default variables (the slots to drag scripts into)
|
||||
DrawDefaultInspector();
|
||||
|
||||
// Get reference to the script
|
||||
DebugControlPanel myScript = (DebugControlPanel)target;
|
||||
|
||||
GUILayout.Space(20); // Add some spacing
|
||||
GUILayout.Label("Event Triggers", EditorStyles.boldLabel);
|
||||
|
||||
// Draw Buttons
|
||||
if (GUILayout.Button("Trigger Doorbell Event"))
|
||||
{
|
||||
myScript.TestDoorbell();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Trigger Nightmare Mode"))
|
||||
{
|
||||
myScript.TestNightmare();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Toggle All Lights"))
|
||||
{
|
||||
myScript.ToggleAllLights();
|
||||
}
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
if (GUILayout.Button("Force Warp Player"))
|
||||
{
|
||||
myScript.ForceWarp();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
2
Assets/Scripts/DebugControlPanel.cs.meta
Normal file
2
Assets/Scripts/DebugControlPanel.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e7c43ef1e9c4ea4285a66d4b9b1b630
|
||||
82
Assets/Scripts/DoorController.cs
Normal file
82
Assets/Scripts/DoorController.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class DoorController : MonoBehaviour, IInteractable
|
||||
{
|
||||
[Header("Movement Settings")]
|
||||
public float openAngle = 90f; // How far the door swings (usually 90 or -90)
|
||||
public float smoothSpeed = 2f; // How fast it opens
|
||||
private bool isOpen = false;
|
||||
|
||||
[Header("Horror Mechanics")]
|
||||
[Range(0f, 1f)] public float stuckChance = 0.1f; // 10% chance to fail
|
||||
public float rattleStrength = 5f; // How much it shakes if stuck
|
||||
|
||||
[Header("Audio")]
|
||||
public AudioSource audioSource;
|
||||
public AudioClip openSound;
|
||||
public AudioClip closeSound;
|
||||
public AudioClip stuckSound; // Sound of handle jiggling or locked thud
|
||||
|
||||
// Internal State
|
||||
private Quaternion initialRotation;
|
||||
private Quaternion targetRotation;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Remember how the door was rotated at the start
|
||||
initialRotation = transform.localRotation;
|
||||
targetRotation = initialRotation;
|
||||
|
||||
// Auto-fetch audio source if missed
|
||||
if (audioSource == null) audioSource = GetComponent<AudioSource>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Smoothly rotate the door towards the target rotation every frame
|
||||
transform.localRotation = Quaternion.Slerp(transform.localRotation, targetRotation, Time.deltaTime * smoothSpeed);
|
||||
}
|
||||
|
||||
public void Interact()
|
||||
{
|
||||
// 1. Calculate "Stuck" Mechanic
|
||||
// Only checking stuck chance if we are trying to OPEN it (closing usually doesn't jam)
|
||||
if (!isOpen && Random.value < stuckChance)
|
||||
{
|
||||
PlaySound(stuckSound);
|
||||
// Optional: Add a tiny visual "shake" here if you want advanced polish
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Toggle State
|
||||
isOpen = !isOpen;
|
||||
|
||||
// 3. Set Target Rotation
|
||||
if (isOpen)
|
||||
{
|
||||
// Calculate rotation based on the openAngle
|
||||
targetRotation = initialRotation * Quaternion.Euler(0, openAngle, 0);
|
||||
PlaySound(openSound);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return to start
|
||||
targetRotation = initialRotation;
|
||||
PlaySound(closeSound);
|
||||
}
|
||||
}
|
||||
|
||||
void PlaySound(AudioClip clip)
|
||||
{
|
||||
if (audioSource != null && clip != null)
|
||||
{
|
||||
audioSource.PlayOneShot(clip);
|
||||
}
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
{
|
||||
if (isOpen) return "Press [E] to <color=yellow>Close</color>";
|
||||
else return "Press [E] to <color=yellow>Open</color>";
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/DoorController.cs.meta
Normal file
2
Assets/Scripts/DoorController.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: be04b116a17111d499850e75cbf8180c
|
||||
165
Assets/Scripts/FrontDoorEvent.cs
Normal file
165
Assets/Scripts/FrontDoorEvent.cs
Normal file
@@ -0,0 +1,165 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class FrontDoorEvent : MonoBehaviour, IInteractable
|
||||
{
|
||||
[Header("Door Settings")]
|
||||
public float openAngle = 90f;
|
||||
public float smoothSpeed = 2f;
|
||||
|
||||
[Header("Audio Clips")]
|
||||
public AudioSource doorSource;
|
||||
public AudioClip doorbellClip;
|
||||
public AudioClip voiceClip; // <--- NEW: The voice line
|
||||
[Tooltip("IMPORTANT: This must be a SINGLE knock sound, not a loop!")]
|
||||
public AudioClip singleKnockClip;
|
||||
public AudioClip doorOpenSound;
|
||||
// windSound is removed
|
||||
|
||||
[Header("Timeline Settings")]
|
||||
public float timeBeforeVoice = 3f; // Ring for 3 seconds
|
||||
public float timeAfterVoice = 3f; // Ring for 3 seconds AFTER voice, then knock
|
||||
|
||||
[Header("Knocking Settings")]
|
||||
[Range(0.1f, 1f)] public float heavyPitch = 0.8f;
|
||||
public float totalKnockingDuration = 8f;
|
||||
public float startDelay = 1.0f;
|
||||
public float endDelay = 0.1f;
|
||||
|
||||
// State
|
||||
private bool isOpen = false;
|
||||
private bool eventActive = false;
|
||||
private Quaternion initialRotation;
|
||||
private Quaternion targetRotation;
|
||||
|
||||
void Start()
|
||||
{
|
||||
initialRotation = transform.localRotation;
|
||||
targetRotation = initialRotation;
|
||||
if(GameManager.Instance != null) GameManager.Instance.frontDoor = this;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
transform.localRotation = Quaternion.Slerp(transform.localRotation, targetRotation, Time.deltaTime * smoothSpeed);
|
||||
}
|
||||
|
||||
public void TriggerEvent()
|
||||
{
|
||||
if(eventActive || isOpen) return;
|
||||
eventActive = true;
|
||||
StartCoroutine(TheHauntingSequence());
|
||||
}
|
||||
|
||||
IEnumerator TheHauntingSequence()
|
||||
{
|
||||
// --- PHASE 1: INITIAL RINGING ---
|
||||
doorSource.pitch = 1f;
|
||||
doorSource.volume = 0.5f;
|
||||
doorSource.clip = doorbellClip;
|
||||
doorSource.loop = true;
|
||||
doorSource.Play();
|
||||
|
||||
// Wait...
|
||||
float timer = 0f;
|
||||
while (timer < timeBeforeVoice && !isOpen)
|
||||
{
|
||||
timer += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
if (isOpen) yield break;
|
||||
|
||||
// --- PHASE 2: THE VOICE ---
|
||||
if (voiceClip != null)
|
||||
{
|
||||
doorSource.Stop(); // Cut the bell
|
||||
doorSource.loop = false;
|
||||
|
||||
// Play Voice
|
||||
doorSource.PlayOneShot(voiceClip);
|
||||
|
||||
// Wait for the exact length of the voice clip
|
||||
float voiceTimer = 0f;
|
||||
while (voiceTimer < voiceClip.length && !isOpen)
|
||||
{
|
||||
voiceTimer += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
if (isOpen) yield break;
|
||||
|
||||
// --- PHASE 3: RESUME RINGING ---
|
||||
doorSource.clip = doorbellClip;
|
||||
doorSource.loop = true;
|
||||
doorSource.Play();
|
||||
|
||||
timer = 0f;
|
||||
while (timer < timeAfterVoice && !isOpen)
|
||||
{
|
||||
timer += Time.deltaTime;
|
||||
yield return null;
|
||||
}
|
||||
if (isOpen) yield break;
|
||||
|
||||
// --- PHASE 4: AGGRESSIVE KNOCKING (The Drummer Method) ---
|
||||
doorSource.Stop();
|
||||
doorSource.loop = false;
|
||||
doorSource.pitch = heavyPitch; // Drop pitch for bass
|
||||
|
||||
float knockTimer = 0f;
|
||||
|
||||
while (knockTimer < totalKnockingDuration && !isOpen)
|
||||
{
|
||||
float progress = knockTimer / totalKnockingDuration;
|
||||
|
||||
// Volume Up
|
||||
float currentVol = Mathf.Lerp(0.4f, 1f, progress);
|
||||
doorSource.PlayOneShot(singleKnockClip, currentVol);
|
||||
|
||||
// Speed Up (Reduce Delay)
|
||||
float currentDelay = Mathf.Lerp(startDelay, endDelay, progress);
|
||||
|
||||
// Wait for delay
|
||||
float subTimer = 0f;
|
||||
while(subTimer < currentDelay)
|
||||
{
|
||||
subTimer += Time.deltaTime;
|
||||
knockTimer += Time.deltaTime;
|
||||
if(isOpen) yield break;
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
|
||||
// --- PHASE 5: SILENCE ---
|
||||
Debug.Log("Knocking finished. Dead silence.");
|
||||
}
|
||||
|
||||
public void Interact()
|
||||
{
|
||||
if (isOpen) return;
|
||||
|
||||
// Player Opened the Door!
|
||||
isOpen = true;
|
||||
eventActive = false;
|
||||
|
||||
// Open Visuals
|
||||
targetRotation = initialRotation * Quaternion.Euler(0, openAngle, 0);
|
||||
|
||||
// Audio Reset
|
||||
doorSource.Stop();
|
||||
doorSource.pitch = 1f;
|
||||
doorSource.volume = 1f;
|
||||
|
||||
// Just play the open sound, NO wind following it
|
||||
doorSource.PlayOneShot(doorOpenSound);
|
||||
|
||||
// Trigger Nightmare Mode
|
||||
if(GameManager.Instance != null) GameManager.Instance.TriggerNightmareMode();
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
{
|
||||
if (eventActive) return "Press [E] to <color=red>Check Noise</color>";
|
||||
return isOpen ? "" : "Press [E] to Open";
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/FrontDoorEvent.cs.meta
Normal file
2
Assets/Scripts/FrontDoorEvent.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48ce9e6b570caba4cb19ff957d7791a4
|
||||
@@ -6,6 +6,11 @@ public class GameManager : MonoBehaviour
|
||||
public static GameManager Instance;
|
||||
public List<LightSwitch> allSwitches = new List<LightSwitch>();
|
||||
|
||||
[Header("Front Door Event")]
|
||||
public FrontDoorEvent frontDoor; // Assigned automatically by the door script
|
||||
public int lightsOffToTriggerDoor = 4; // Event happens after 4 lights turned off
|
||||
private int lightsTurnedOffCounter = 0;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (Instance == null) Instance = this;
|
||||
@@ -14,21 +19,23 @@ public class GameManager : MonoBehaviour
|
||||
|
||||
public void RegisterSwitch(LightSwitch sw)
|
||||
{
|
||||
if(!allSwitches.Contains(sw)) allSwitches.Add(sw);
|
||||
if (!allSwitches.Contains(sw)) allSwitches.Add(sw);
|
||||
}
|
||||
|
||||
public void CheckLights()
|
||||
{
|
||||
bool anyLightsOn = false;
|
||||
foreach(LightSwitch sw in allSwitches)
|
||||
int currentOffCount = 0;
|
||||
foreach (LightSwitch sw in allSwitches)
|
||||
{
|
||||
if (sw.isLightOn) anyLightsOn = true;
|
||||
if (!sw.isLightOn) currentOffCount++;
|
||||
}
|
||||
|
||||
if (!anyLightsOn)
|
||||
// Check if we hit the threshold for the doorbell
|
||||
if (currentOffCount >= lightsOffToTriggerDoor && frontDoor != null)
|
||||
{
|
||||
Debug.Log("All lights are off. Player can go to bed.");
|
||||
// You can enable the "Bed" interaction collider here
|
||||
frontDoor.TriggerEvent();
|
||||
// Set to null so it doesn't trigger twice
|
||||
frontDoor = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +43,7 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
// Find all switches that are currently OFF
|
||||
List<LightSwitch> offSwitches = new List<LightSwitch>();
|
||||
foreach(LightSwitch sw in allSwitches)
|
||||
foreach (LightSwitch sw in allSwitches)
|
||||
{
|
||||
if (!sw.isLightOn) offSwitches.Add(sw);
|
||||
}
|
||||
@@ -49,4 +56,32 @@ public class GameManager : MonoBehaviour
|
||||
Debug.Log("A light turned back on!");
|
||||
}
|
||||
}
|
||||
public bool AreAnyLightsOn()
|
||||
{
|
||||
foreach (LightSwitch sw in allSwitches)
|
||||
{
|
||||
if (sw.isLightOn) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public void TriggerNightmareMode()
|
||||
{
|
||||
Debug.Log("NOBODY IS HOME. NIGHTMARE MODE ACTIVE.");
|
||||
|
||||
foreach(LightSwitch sw in allSwitches)
|
||||
{
|
||||
// 1. Turn all lights back ON
|
||||
sw.ForceLightOn();
|
||||
|
||||
// 2. Increase Difficulty (59% increase)
|
||||
// If chance was 0.1 (10%), it becomes roughly 0.16
|
||||
sw.malfunctionChance += (sw.malfunctionChance * 0.59f);
|
||||
|
||||
// Cap it so it's not impossible (e.g., max 50% fail rate)
|
||||
if (sw.malfunctionChance > 0.5f) sw.malfunctionChance = 0.5f;
|
||||
|
||||
// 3. Make random scares more frequent
|
||||
sw.subsequentEventChance += 10f;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Assets/Scripts/HauntedPhone.cs
Normal file
45
Assets/Scripts/HauntedPhone.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HauntedPhone : MonoBehaviour
|
||||
{
|
||||
public AudioSource phoneAudioSource;
|
||||
public AudioClip ringSound;
|
||||
|
||||
private bool isRinging = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (phoneAudioSource == null) phoneAudioSource = GetComponent<AudioSource>();
|
||||
phoneAudioSource.loop = true; // Make sure the ringing loops!
|
||||
}
|
||||
|
||||
// Call this from the LightSwitch "OnFirstSwitchOff"
|
||||
public void StartRinging()
|
||||
{
|
||||
if (!isRinging && ringSound != null)
|
||||
{
|
||||
phoneAudioSource.clip = ringSound;
|
||||
phoneAudioSource.Play();
|
||||
isRinging = true;
|
||||
Debug.Log("Phone started ringing...");
|
||||
}
|
||||
}
|
||||
|
||||
// Call this from the LightSwitch "OnFirstSwitchOn"
|
||||
public void StopRinging()
|
||||
{
|
||||
if (isRinging)
|
||||
{
|
||||
phoneAudioSource.Stop();
|
||||
isRinging = false;
|
||||
Debug.Log("Phone stopped.");
|
||||
}
|
||||
}
|
||||
|
||||
// Call this from "OnRandomEvent" for a quick scare
|
||||
public void PlayCreepyWhisper()
|
||||
{
|
||||
// Logic for a one-shot scare sound
|
||||
Debug.Log("Creepy whisper played from phone...");
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/HauntedPhone.cs.meta
Normal file
2
Assets/Scripts/HauntedPhone.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fafa542c827db5641841e841b00e8388
|
||||
82
Assets/Scripts/HauntedPram.cs
Normal file
82
Assets/Scripts/HauntedPram.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HauntedPram : MonoBehaviour
|
||||
{
|
||||
public AudioSource pramAudioSource, babyAudioSource;
|
||||
public AudioClip creakSound, babyCrySound;
|
||||
|
||||
private bool isCreaking = false, isCrying = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (pramAudioSource == null) pramAudioSource = GetComponent<AudioSource>();
|
||||
pramAudioSource.loop = true; // Make sure the creaking loops!
|
||||
}
|
||||
|
||||
// Call this from the LightSwitch "OnFirstSwitchOff"
|
||||
public void StartCreaking()
|
||||
{
|
||||
if (!isCreaking && creakSound != null)
|
||||
{
|
||||
pramAudioSource.clip = creakSound;
|
||||
pramAudioSource.Play();
|
||||
isCreaking = true;
|
||||
Debug.Log("Pram started creaking...");
|
||||
}
|
||||
}
|
||||
|
||||
// Call this from the LightSwitch "OnFirstSwitchOn"
|
||||
public void StopCreaking()
|
||||
{
|
||||
if (isCreaking)
|
||||
{
|
||||
pramAudioSource.Stop();
|
||||
isCreaking = false;
|
||||
Debug.Log("Pram stopped creaking.");
|
||||
}
|
||||
}
|
||||
public void StartCrying()
|
||||
{
|
||||
if (!isCrying && babyCrySound != null)
|
||||
{
|
||||
pramAudioSource.clip = babyCrySound;
|
||||
pramAudioSource.Play();
|
||||
isCrying = true;
|
||||
Debug.Log("Pram baby started crying...");
|
||||
}
|
||||
}
|
||||
|
||||
public void StopCrying()
|
||||
{
|
||||
if (isCrying)
|
||||
{
|
||||
pramAudioSource.Stop();
|
||||
isCrying = false;
|
||||
Debug.Log("Pram baby stopped crying.");
|
||||
}
|
||||
}
|
||||
public void StartAllSounds()
|
||||
{
|
||||
if (!isCreaking && creakSound != null && !isCrying && babyCrySound != null)
|
||||
{
|
||||
pramAudioSource.clip = creakSound;
|
||||
babyAudioSource.clip = babyCrySound;
|
||||
pramAudioSource.Play();
|
||||
babyAudioSource.Play();
|
||||
isCreaking = true;
|
||||
isCrying = true;
|
||||
Debug.Log("Pram started creaking and crying...");
|
||||
}
|
||||
}
|
||||
public void StopAllSounds()
|
||||
{
|
||||
if (isCreaking || isCrying)
|
||||
{
|
||||
pramAudioSource.Stop();
|
||||
babyAudioSource.Stop();
|
||||
isCreaking = false;
|
||||
isCrying = false;
|
||||
Debug.Log("Pram stopped all sounds.");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/HauntedPram.cs.meta
Normal file
2
Assets/Scripts/HauntedPram.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 677922238343afb44af86e0251cf2bfc
|
||||
50
Assets/Scripts/HauntedTV.cs
Normal file
50
Assets/Scripts/HauntedTV.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HauntedTV : MonoBehaviour
|
||||
{
|
||||
public AudioSource tvAudioSource, tvLaughAudioSource, watcherAudioSource;
|
||||
public AudioClip tvLaughSound, tvSound, watcherLaughSound;
|
||||
public Light tvLight;
|
||||
|
||||
private bool isOn = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (tvAudioSource == null) tvAudioSource = GetComponent<AudioSource>();
|
||||
tvAudioSource.loop = true; // Make sure the static loops!
|
||||
if (watcherAudioSource == null) watcherAudioSource = GetComponent<AudioSource>();
|
||||
watcherAudioSource.loop = true; // Make sure the laugh loops!
|
||||
if (tvLight != null) tvLight.enabled = false;
|
||||
}
|
||||
|
||||
// Call this from the LightSwitch "OnFirstSwitchOff"
|
||||
public void StartEvent()
|
||||
{
|
||||
if (!isOn && tvSound != null && watcherLaughSound != null && tvLaughSound != null)
|
||||
{
|
||||
tvAudioSource.clip = tvSound;
|
||||
tvLaughAudioSource.clip = tvLaughSound;
|
||||
watcherAudioSource.clip = watcherLaughSound;
|
||||
tvAudioSource.Play();
|
||||
tvLaughAudioSource.Play();
|
||||
watcherAudioSource.Play();
|
||||
isOn = true;
|
||||
if (tvLight != null) tvLight.enabled = true;
|
||||
Debug.Log("TV started static...");
|
||||
}
|
||||
}
|
||||
|
||||
// Call this from the LightSwitch "OnFirstSwitchOn"
|
||||
public void StopEvent()
|
||||
{
|
||||
if (isOn)
|
||||
{
|
||||
tvAudioSource.Stop();
|
||||
watcherAudioSource.Stop();
|
||||
tvLaughAudioSource.Stop();
|
||||
isOn = false;
|
||||
if (tvLight != null) tvLight.enabled = false;
|
||||
Debug.Log("TV stopped static.");
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/HauntedTV.cs.meta
Normal file
2
Assets/Scripts/HauntedTV.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69e32356c87a2b44f88628ea403dce6c
|
||||
44
Assets/Scripts/HeadBobber.cs
Normal file
44
Assets/Scripts/HeadBobber.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class HeadBobber : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
public float bobSpeed = 14f; // How fast the head bobs
|
||||
public float bobAmount = 0.05f; // How high/low the head goes
|
||||
|
||||
[Tooltip("Reference to the parent player object")]
|
||||
public CharacterController playerController;
|
||||
|
||||
private float defaultPosY = 0;
|
||||
private float timer = 0;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Remember where the camera is supposed to be normally
|
||||
defaultPosY = transform.localPosition.y;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (playerController == null) return;
|
||||
|
||||
// Only bob if we are moving roughly walking speed
|
||||
// (magnitude > 0.1f) means we are moving
|
||||
if (Mathf.Abs(playerController.velocity.x) > 0.1f || Mathf.Abs(playerController.velocity.z) > 0.1f)
|
||||
{
|
||||
// Calculate the Sine Wave
|
||||
timer += Time.deltaTime * bobSpeed;
|
||||
float newY = defaultPosY + Mathf.Sin(timer) * bobAmount;
|
||||
|
||||
// Apply it
|
||||
transform.localPosition = new Vector3(transform.localPosition.x, newY, transform.localPosition.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset to neutral when stopped
|
||||
timer = 0;
|
||||
Vector3 targetPos = new Vector3(transform.localPosition.x, defaultPosY, transform.localPosition.z);
|
||||
transform.localPosition = Vector3.Lerp(transform.localPosition, targetPos, Time.deltaTime * 5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/HeadBobber.cs.meta
Normal file
2
Assets/Scripts/HeadBobber.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23762b76f3f99214ebae97c1f93e2d92
|
||||
51
Assets/Scripts/InfiniteStairs.cs
Normal file
51
Assets/Scripts/InfiniteStairs.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class InfiniteStairs : MonoBehaviour
|
||||
{
|
||||
[Header("Settings")]
|
||||
[Tooltip("How many times must they climb before the loop breaks?")]
|
||||
public int loopsRequired = 3;
|
||||
|
||||
[Tooltip("Drag an empty GameObject here. Position it lower down the stairs.")]
|
||||
public Transform[] resetPoint;
|
||||
|
||||
private int currentLoops = 0;
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
// Only loop if we haven't finished the required cycles
|
||||
if (currentLoops < loopsRequired)
|
||||
{
|
||||
// 1. Calculate the offset
|
||||
// This ensures if they enter the trigger on the left side,
|
||||
// they appear on the left side at the bottom (smooth transition)
|
||||
Vector3 offset = other.transform.position - transform.position;
|
||||
|
||||
// 2. Teleport
|
||||
// We keep their Rotation exactly the same, only changing Position
|
||||
CharacterController cc = other.GetComponent<CharacterController>();
|
||||
|
||||
// You must disable CC briefly to teleport, or it sometimes fights back
|
||||
if (cc != null) cc.enabled = false;
|
||||
foreach (Transform resetPoint in resetPoint)
|
||||
{
|
||||
other.transform.position = resetPoint.position + offset;
|
||||
}
|
||||
|
||||
if (cc != null) cc.enabled = true;
|
||||
|
||||
// 3. Increment Loop
|
||||
currentLoops++;
|
||||
Debug.Log($"Stair Loop: {currentLoops} / {loopsRequired}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Loop finished - Disable this trigger so they can pass
|
||||
Debug.Log("Loop broken. Player can proceed.");
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/InfiniteStairs.cs.meta
Normal file
2
Assets/Scripts/InfiniteStairs.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35a98b200ae5fa14398a2ca7f1ff819e
|
||||
@@ -5,7 +5,7 @@ public class InteractionUI : MonoBehaviour
|
||||
{
|
||||
public static InteractionUI Instance; // Singleton for easy access
|
||||
public TextMeshProUGUI promptText;
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
if (Instance == null) Instance = this;
|
||||
@@ -14,7 +14,7 @@ public class InteractionUI : MonoBehaviour
|
||||
void Start()
|
||||
{
|
||||
// Hide text at start
|
||||
if(promptText != null) promptText.text = "";
|
||||
if (promptText != null) promptText.text = "";
|
||||
}
|
||||
|
||||
public void UpdatePrompt(string message)
|
||||
|
||||
@@ -1,82 +1,116 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events; // Required for the Event System
|
||||
|
||||
public class LightSwitch : MonoBehaviour, IInteractable
|
||||
{
|
||||
[Header("Settings")]
|
||||
public Light linkedLight;
|
||||
public Light[] linkedLight;
|
||||
public bool isLightOn = true;
|
||||
|
||||
[Header("Horror Mechanics")]
|
||||
[Range(0f, 1f)] public float malfunctionChance = 0.1f;
|
||||
|
||||
|
||||
[Header("Audio")]
|
||||
public AudioSource audioSource;
|
||||
public AudioClip switchClickSound;
|
||||
public AudioClip malfunctionSound;
|
||||
|
||||
[Header("Horror Mechanics")]
|
||||
[Range(0f, 1f)] public float malfunctionChance = 0.1f;
|
||||
|
||||
// --- NEW EVENT SYSTEM ---
|
||||
[Header("Event System")]
|
||||
[Tooltip("If true, the Special Events below will fire on the first interaction.")]
|
||||
public bool enableSpecialEvents = false;
|
||||
|
||||
[Tooltip("What happens the VERY FIRST time you turn the light OFF? (e.g. Phone Rings)")]
|
||||
public UnityEvent OnFirstSwitchOff;
|
||||
|
||||
[Tooltip("What happens the VERY FIRST time you turn the light ON? (e.g. Phone Stops)")]
|
||||
public UnityEvent OnFirstSwitchOn;
|
||||
|
||||
[Space(10)]
|
||||
[Range(0f, 100f)] public float subsequentEventChance = 2f; // 2% chance
|
||||
[Tooltip("What happens randomly after the first time? (e.g. Scary noise)")]
|
||||
public UnityEvent OnRandomEvent;
|
||||
|
||||
// Track how many times we've flipped the switch
|
||||
private int flipCount = 0;
|
||||
private bool firstOffTriggered = false;
|
||||
private bool firstOnTriggered = false;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Safety Check: If you forgot to assign the AudioSource, try to find one.
|
||||
if (audioSource == null) audioSource = GetComponent<AudioSource>();
|
||||
|
||||
UpdateLightState();
|
||||
|
||||
// Safety Check: Only register if the Manager actually exists
|
||||
if(GameManager.Instance != null)
|
||||
{
|
||||
GameManager.Instance.RegisterSwitch(this);
|
||||
}
|
||||
if (GameManager.Instance != null) GameManager.Instance.RegisterSwitch(this);
|
||||
}
|
||||
|
||||
public void Interact()
|
||||
{
|
||||
// 1. Calculate Malfunction
|
||||
// 1. Malfunction Check
|
||||
if (Random.value < malfunctionChance)
|
||||
{
|
||||
PlaySound(malfunctionSound);
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Toggle Light
|
||||
isLightOn = !isLightOn;
|
||||
PlaySound(switchClickSound);
|
||||
UpdateLightState();
|
||||
|
||||
// 3. Notify Manager (With Safety Check)
|
||||
if(GameManager.Instance != null)
|
||||
|
||||
if (GameManager.Instance != null) GameManager.Instance.CheckLights();
|
||||
|
||||
// 3. HANDLE EVENTS
|
||||
HandleEvents();
|
||||
}
|
||||
|
||||
void HandleEvents()
|
||||
{
|
||||
if (!enableSpecialEvents) return;
|
||||
|
||||
// Logic: specific events for first time, random for later
|
||||
if (!isLightOn && !firstOffTriggered)
|
||||
{
|
||||
GameManager.Instance.CheckLights();
|
||||
// First time turning OFF
|
||||
OnFirstSwitchOff.Invoke();
|
||||
firstOffTriggered = true;
|
||||
}
|
||||
else
|
||||
else if (isLightOn && firstOffTriggered && !firstOnTriggered)
|
||||
{
|
||||
Debug.LogWarning("Light switched, but no GameManager found to track it!");
|
||||
// First time turning back ON (after having turned it off)
|
||||
OnFirstSwitchOn.Invoke();
|
||||
firstOnTriggered = true;
|
||||
}
|
||||
else if (firstOffTriggered && firstOnTriggered)
|
||||
{
|
||||
// We have done the scripted part, now roll dice for random scares
|
||||
float roll = Random.Range(0f, 100f);
|
||||
if (roll < subsequentEventChance)
|
||||
{
|
||||
OnRandomEvent.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ForceLightOn()
|
||||
{
|
||||
isLightOn = true;
|
||||
PlaySound(switchClickSound);
|
||||
PlaySound(switchClickSound);
|
||||
UpdateLightState();
|
||||
}
|
||||
|
||||
void UpdateLightState()
|
||||
{
|
||||
if(linkedLight != null) linkedLight.enabled = isLightOn;
|
||||
foreach (var linkedLight in linkedLight)
|
||||
if (linkedLight != null) linkedLight.enabled = isLightOn;
|
||||
}
|
||||
|
||||
// Helper function to safely play sounds
|
||||
void PlaySound(AudioClip clip)
|
||||
{
|
||||
if (audioSource != null && clip != null)
|
||||
{
|
||||
audioSource.PlayOneShot(clip);
|
||||
}
|
||||
if (audioSource != null && clip != null) audioSource.PlayOneShot(clip);
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
{
|
||||
if (isLightOn) return "Press [E] to turn light <color=red>OFF</color>";
|
||||
else return "Press [E] to turn light <color=green>ON</color>";
|
||||
return isLightOn ? "Turn <color=red>OFF</color>" : "Turn <color=green>ON</color>";
|
||||
}
|
||||
}
|
||||
@@ -1,49 +1,47 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerController : MonoBehaviour
|
||||
{
|
||||
[Header("Movement")]
|
||||
public float moveSpeed = 5f;
|
||||
public float mouseSensitivity = 15f;
|
||||
public float gravity = -9.81f; // Standard Earth gravity
|
||||
public float jumpHeight = 1.0f; // Optional, set to 0 if no jumping allowed
|
||||
|
||||
[Header("Look Settings")]
|
||||
public float mouseSensitivity = 10f;
|
||||
public float maxLookAngle = 70f;
|
||||
|
||||
[Header("Interaction")]
|
||||
public float interactionDistance = 3f;
|
||||
public LayerMask interactionLayer;
|
||||
|
||||
// Components
|
||||
private CharacterController controller;
|
||||
private Transform cameraTransform;
|
||||
|
||||
// State
|
||||
private float verticalRotation = 0f;
|
||||
|
||||
// Reference to the generated C# class
|
||||
private Vector3 velocity; // Stores our falling speed
|
||||
private bool isGrounded; // Are we touching the floor?
|
||||
|
||||
// Inputs
|
||||
private InputSystem_Actions inputActions;
|
||||
private Vector2 moveInput;
|
||||
private Vector2 lookInput;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
inputActions = new InputSystem_Actions();
|
||||
controller = GetComponent<CharacterController>();
|
||||
cameraTransform = Camera.main.transform;
|
||||
|
||||
// Lock cursor so it doesn't leave the window
|
||||
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
Cursor.visible = false;
|
||||
|
||||
// --- INPUT BINDINGS ---
|
||||
|
||||
// 1. Movement (WASD)
|
||||
// Bind Inputs
|
||||
inputActions.Player.Move.performed += ctx => moveInput = ctx.ReadValue<Vector2>();
|
||||
inputActions.Player.Move.canceled += ctx => moveInput = Vector2.zero;
|
||||
|
||||
// 2. Looking (Mouse)
|
||||
inputActions.Player.Look.performed += ctx => lookInput = ctx.ReadValue<Vector2>();
|
||||
inputActions.Player.Look.canceled += ctx => lookInput = Vector2.zero;
|
||||
|
||||
// 3. Interaction (The "E" Key)
|
||||
// This listens strictly for the button press.
|
||||
// It does NOT trigger on collision.
|
||||
inputActions.Player.Interact.performed += ctx => TryInteract();
|
||||
inputActions.Player.Interact.started += ctx => TryInteract();
|
||||
}
|
||||
|
||||
void OnEnable() => inputActions.Enable();
|
||||
@@ -51,32 +49,61 @@ public class PlayerController : MonoBehaviour
|
||||
|
||||
void Update()
|
||||
{
|
||||
HandleGravity(); // <--- NEW GRAVITY FUNCTION
|
||||
HandleMovement();
|
||||
HandleLook();
|
||||
UpdateInteractionUI(); // Only updates the text, does not flip switches
|
||||
UpdateInteractionUI();
|
||||
}
|
||||
|
||||
void HandleGravity()
|
||||
{
|
||||
// If the trap disabled our controller, do not apply gravity!
|
||||
if (controller == null || !controller.enabled) return;
|
||||
// Check if the controller thinks it's on the ground
|
||||
isGrounded = controller.isGrounded;
|
||||
|
||||
if (isGrounded && velocity.y < 0)
|
||||
{
|
||||
// Reset falling speed when on ground (keep slightly negative to stick to floor)
|
||||
velocity.y = -2f;
|
||||
}
|
||||
|
||||
// Apply Gravity over time
|
||||
velocity.y += gravity * Time.deltaTime;
|
||||
|
||||
// Apply the velocity to the controller
|
||||
controller.Move(velocity * Time.deltaTime);
|
||||
}
|
||||
|
||||
void HandleMovement()
|
||||
{
|
||||
if (controller == null || !controller.enabled) return;
|
||||
Vector3 move = transform.right * moveInput.x + transform.forward * moveInput.y;
|
||||
controller.Move(move * moveSpeed * Time.deltaTime);
|
||||
}
|
||||
|
||||
// ... (Keep HandleLook, UpdateInteractionUI, and TryInteract exactly the same as before)
|
||||
// For brevity, I am not pasting the repeated Look/Interact code here,
|
||||
// but ensure you keep those functions in your file!
|
||||
// If you need the full paste again, let me know.
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// PASTE YOUR HandleLook, UpdateInteractionUI, and TryInteract HERE
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
void HandleLook()
|
||||
{
|
||||
float mouseX = lookInput.x * mouseSensitivity * Time.deltaTime;
|
||||
float mouseY = lookInput.y * mouseSensitivity * Time.deltaTime;
|
||||
Vector2 rawInput = inputActions.Player.Look.ReadValue<Vector2>();
|
||||
float mouseX = rawInput.x * mouseSensitivity * Time.deltaTime;
|
||||
float mouseY = rawInput.y * mouseSensitivity * Time.deltaTime;
|
||||
|
||||
verticalRotation -= mouseY;
|
||||
verticalRotation = Mathf.Clamp(verticalRotation, -90f, 90f);
|
||||
verticalRotation = Mathf.Clamp(verticalRotation, -maxLookAngle, maxLookAngle);
|
||||
|
||||
cameraTransform.localRotation = Quaternion.Euler(verticalRotation, 0f, 0f);
|
||||
transform.Rotate(Vector3.up * mouseX);
|
||||
}
|
||||
|
||||
// --- INTERACTION LOGIC ---
|
||||
|
||||
// This checks what we are looking at to update the screen text (e.g. "Turn On")
|
||||
void UpdateInteractionUI()
|
||||
{
|
||||
Ray ray = new Ray(cameraTransform.position, cameraTransform.forward);
|
||||
@@ -86,39 +113,24 @@ public class PlayerController : MonoBehaviour
|
||||
{
|
||||
IInteractable interactable = hit.collider.GetComponent<IInteractable>();
|
||||
if (interactable != null && InteractionUI.Instance != null)
|
||||
{
|
||||
InteractionUI.Instance.UpdatePrompt(interactable.GetDescription());
|
||||
}
|
||||
else if (InteractionUI.Instance != null)
|
||||
{
|
||||
InteractionUI.Instance.ClearPrompt();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (InteractionUI.Instance != null) InteractionUI.Instance.ClearPrompt();
|
||||
}
|
||||
else if (InteractionUI.Instance != null) InteractionUI.Instance.ClearPrompt();
|
||||
}
|
||||
|
||||
// This is ONLY called when 'E' is pressed.
|
||||
void TryInteract()
|
||||
{
|
||||
Ray ray = new Ray(cameraTransform.position, cameraTransform.forward);
|
||||
RaycastHit hit;
|
||||
|
||||
// Fire a raycast forward
|
||||
if (Physics.Raycast(ray, out hit, interactionDistance, interactionLayer))
|
||||
{
|
||||
// Did we hit something with the IInteractable script?
|
||||
IInteractable interactable = hit.collider.GetComponent<IInteractable>();
|
||||
|
||||
if (interactable != null)
|
||||
{
|
||||
// If yes, execute the code (Flip the switch)
|
||||
interactable.Interact();
|
||||
|
||||
// Immediately update the UI text so it switches from "Turn Off" to "Turn On" instantly
|
||||
if (InteractionUI.Instance != null)
|
||||
if (InteractionUI.Instance != null)
|
||||
InteractionUI.Instance.UpdatePrompt(interactable.GetDescription());
|
||||
}
|
||||
}
|
||||
|
||||
66
Assets/Scripts/StairWarp.cs
Normal file
66
Assets/Scripts/StairWarp.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class StairWarp : MonoBehaviour
|
||||
{
|
||||
[Header("Standard Warps")]
|
||||
public Transform[] randomRooms;
|
||||
|
||||
[Header("Special Traps")]
|
||||
public TVRoomTrap tvTrapScript; // <--- ASSIGN THIS IN INSPECTOR
|
||||
[Range(0, 100)] public float trapChance = 10f; // 10% chance for the TV Trap
|
||||
|
||||
[Header("General Settings")]
|
||||
[Range(0, 100)] public float warpChance = 30f;
|
||||
public AudioSource audioSource;
|
||||
public AudioClip warpWhooshSound;
|
||||
|
||||
private bool hasTriggered = false;
|
||||
|
||||
public void WarpPlayer(GameObject player)
|
||||
{
|
||||
// 1. Check for SPECIAL TRAP first
|
||||
// If we have the script assigned and roll the dice successfully...
|
||||
if (tvTrapScript != null && Random.Range(0, 100) < trapChance)
|
||||
{
|
||||
Debug.Log("TRIGGERING TV TRAP!");
|
||||
tvTrapScript.TriggerTrap(player);
|
||||
return; // Exit function, do not do normal warp
|
||||
}
|
||||
|
||||
// 2. Normal Room Warp (Your existing logic)
|
||||
if (randomRooms.Length == 0) return;
|
||||
|
||||
Transform target = randomRooms[Random.Range(0, randomRooms.Length)];
|
||||
|
||||
CharacterController cc = player.GetComponent<CharacterController>();
|
||||
if (cc != null) cc.enabled = false;
|
||||
|
||||
player.transform.position = target.position;
|
||||
player.transform.rotation = target.rotation;
|
||||
|
||||
if (cc != null) cc.enabled = true;
|
||||
|
||||
if (audioSource != null && warpWhooshSound != null)
|
||||
audioSource.PlayOneShot(warpWhooshSound);
|
||||
|
||||
Debug.Log("Player warped to: " + target.name);
|
||||
}
|
||||
|
||||
// (Keep your OnTriggerEnter / OnTriggerExit logic the same,
|
||||
// just make sure OnTriggerEnter calls WarpPlayer(other.gameObject))
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player") && !hasTriggered)
|
||||
{
|
||||
hasTriggered = true;
|
||||
if (Random.Range(0, 100) < warpChance)
|
||||
{
|
||||
WarpPlayer(other.gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player")) hasTriggered = false;
|
||||
}
|
||||
}
|
||||
7
Assets/Scripts/StairWarp.cs.meta
Normal file
7
Assets/Scripts/StairWarp.cs.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1625fad95a27da744bea569f094bc36f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
119
Assets/Scripts/StaircaseCurse.cs
Normal file
119
Assets/Scripts/StaircaseCurse.cs
Normal file
@@ -0,0 +1,119 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class StaircaseCurse : MonoBehaviour
|
||||
{
|
||||
[Header("Don't Look Back Settings")]
|
||||
[Range(-1f, 1f)] public float killThreshold = -0.2f;
|
||||
public GameObject blackScreenPanel;
|
||||
|
||||
[Header("Spooky Audio System")]
|
||||
[Tooltip("Drag empty GameObjects with AudioSources from around the map here")]
|
||||
public AudioSource[] environmentalSources;
|
||||
public AudioClip[] scaryClips; // Whispers, footsteps, wood creaks
|
||||
[Tooltip("Minimum seconds between random noises")]
|
||||
public float minSoundDelay = 2f;
|
||||
[Tooltip("Maximum seconds between random noises")]
|
||||
public float maxSoundDelay = 5f;
|
||||
|
||||
// Internal State
|
||||
private bool playerOnStairs = false;
|
||||
private Transform playerTransform;
|
||||
private bool isDead = false;
|
||||
private float soundTimer;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Initialize timer
|
||||
soundTimer = Random.Range(minSoundDelay, maxSoundDelay);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (isDead || !playerOnStairs) return;
|
||||
|
||||
// 1. CHECK LIGHTS & FACING DIRECTION
|
||||
// If lights are OFF, the curse is active
|
||||
if (GameManager.Instance != null && !GameManager.Instance.AreAnyLightsOn())
|
||||
{
|
||||
CheckPlayerFacing();
|
||||
|
||||
// 2. HANDLE RANDOM AUDIO
|
||||
HandleAudio();
|
||||
}
|
||||
}
|
||||
|
||||
void HandleAudio()
|
||||
{
|
||||
soundTimer -= Time.deltaTime;
|
||||
|
||||
if (soundTimer <= 0)
|
||||
{
|
||||
PlayRandomSound();
|
||||
// Reset timer
|
||||
soundTimer = Random.Range(minSoundDelay, maxSoundDelay);
|
||||
}
|
||||
}
|
||||
|
||||
void PlayRandomSound()
|
||||
{
|
||||
if (environmentalSources.Length == 0 || scaryClips.Length == 0) return;
|
||||
|
||||
// 1. Pick a random sound
|
||||
AudioClip clip = scaryClips[Random.Range(0, scaryClips.Length)];
|
||||
|
||||
// 2. Pick a random location (Source)
|
||||
AudioSource source = environmentalSources[Random.Range(0, environmentalSources.Length)];
|
||||
|
||||
// 3. Play
|
||||
source.PlayOneShot(clip);
|
||||
Debug.Log($"Played sound from: {source.name}");
|
||||
}
|
||||
|
||||
void CheckPlayerFacing()
|
||||
{
|
||||
// (Same logic as before)
|
||||
Vector3 stairsDir = transform.forward;
|
||||
Vector3 playerDir = playerTransform.forward;
|
||||
stairsDir.y = 0; playerDir.y = 0;
|
||||
stairsDir.Normalize(); playerDir.Normalize();
|
||||
|
||||
if (Vector3.Dot(stairsDir, playerDir) < killThreshold)
|
||||
{
|
||||
TriggerGameOver();
|
||||
}
|
||||
}
|
||||
|
||||
void TriggerGameOver()
|
||||
{
|
||||
isDead = true;
|
||||
if (blackScreenPanel != null) blackScreenPanel.SetActive(true);
|
||||
|
||||
// Disable controls
|
||||
if (playerTransform.GetComponent<PlayerController>())
|
||||
playerTransform.GetComponent<PlayerController>().enabled = false;
|
||||
|
||||
Invoke("RestartLevel", 3f);
|
||||
}
|
||||
|
||||
void RestartLevel()
|
||||
{
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
playerOnStairs = true;
|
||||
playerTransform = other.transform;
|
||||
// Reset timer so a sound doesn't play INSTANTLY upon entering
|
||||
soundTimer = Random.Range(minSoundDelay, maxSoundDelay);
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player")) playerOnStairs = false;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/StaircaseCurse.cs.meta
Normal file
2
Assets/Scripts/StaircaseCurse.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7a7d453bbd891048ac8e2a2004e626a
|
||||
45
Assets/Scripts/StaircaseDistortion.cs
Normal file
45
Assets/Scripts/StaircaseDistortion.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class StaircaseDistortion : MonoBehaviour
|
||||
{
|
||||
[Header("The Vertigo Effect")]
|
||||
public float normalFOV = 60f;
|
||||
public float stretchedFOV = 110f; // High FOV makes things look far away
|
||||
public float transitionSpeed = 0.5f;
|
||||
|
||||
private Camera playerCam;
|
||||
private bool isOnStairs = false;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (playerCam == null) return;
|
||||
|
||||
if (isOnStairs)
|
||||
{
|
||||
// Slowly widen the view (Stretch)
|
||||
playerCam.fieldOfView = Mathf.Lerp(playerCam.fieldOfView, stretchedFOV, Time.deltaTime * transitionSpeed);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return to normal
|
||||
playerCam.fieldOfView = Mathf.Lerp(playerCam.fieldOfView, normalFOV, Time.deltaTime * 2f);
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
playerCam = Camera.main; // Find the camera
|
||||
isOnStairs = true;
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player"))
|
||||
{
|
||||
isOnStairs = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/StaircaseDistortion.cs.meta
Normal file
2
Assets/Scripts/StaircaseDistortion.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c220ca6b6a069cc49bb5e3067ac4350b
|
||||
69
Assets/Scripts/TVRoomTrap.cs
Normal file
69
Assets/Scripts/TVRoomTrap.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class TVRoomTrap : MonoBehaviour
|
||||
{
|
||||
[Header("Warp Locations")]
|
||||
public Transform tvRoomSpawn; // Where they get trapped (TV Room)
|
||||
public Transform mainHallSpawn; // Where they escape to (Hallway)
|
||||
|
||||
[Header("Room Events")]
|
||||
public HauntedTV tvScript; // Reference to the TV script
|
||||
public HauntedPram pramScript; // Reference to the Pram script
|
||||
[Tooltip("How long they are trapped in the room")]
|
||||
public float trapDuration = 3.0f;
|
||||
|
||||
[Header("Audio")]
|
||||
public AudioSource trapAudioSource;
|
||||
public AudioClip warpInSound;
|
||||
public AudioClip warpOutSound;
|
||||
|
||||
// Call this function to start the nightmare
|
||||
public void TriggerTrap(GameObject player)
|
||||
{
|
||||
StartCoroutine(TrapSequence(player));
|
||||
}
|
||||
|
||||
IEnumerator TrapSequence(GameObject player)
|
||||
{
|
||||
CharacterController cc = player.GetComponent<CharacterController>();
|
||||
|
||||
// 1. DISABLE CONTROLS & PHYSICS
|
||||
// We disable the CC so it doesn't fight the teleportation
|
||||
if (cc != null) cc.enabled = false;
|
||||
|
||||
// 2. WARP TO TV ROOM
|
||||
player.transform.position = tvRoomSpawn.position;
|
||||
player.transform.rotation = tvRoomSpawn.rotation;
|
||||
|
||||
// Play Entry Sound
|
||||
if(trapAudioSource && warpInSound) trapAudioSource.PlayOneShot(warpInSound);
|
||||
|
||||
// 3. FORCE TV SCARE
|
||||
if (tvScript != null && pramScript != null)
|
||||
{
|
||||
pramScript.StartAllSounds();
|
||||
tvScript.StartEvent();
|
||||
}
|
||||
|
||||
// 4. WAIT (The 2 seconds of panic)
|
||||
yield return new WaitForSeconds(trapDuration);
|
||||
|
||||
// 5. WARP TO MAIN HALL
|
||||
player.transform.position = mainHallSpawn.position;
|
||||
player.transform.rotation = mainHallSpawn.rotation;
|
||||
|
||||
// 6. FORCE TV SCARE
|
||||
if (tvScript != null && pramScript != null)
|
||||
{
|
||||
pramScript.StopAllSounds();
|
||||
tvScript.StopEvent();
|
||||
}
|
||||
|
||||
// Play Exit Sound
|
||||
if(trapAudioSource && warpOutSound) trapAudioSource.PlayOneShot(warpOutSound);
|
||||
|
||||
// 7. RE-ENABLE CONTROLS
|
||||
if (cc != null) cc.enabled = true;
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/TVRoomTrap.cs.meta
Normal file
2
Assets/Scripts/TVRoomTrap.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15388158d6be9ad4795d02366d9a5db9
|
||||
75
Assets/Scripts/WinZone.cs
Normal file
75
Assets/Scripts/WinZone.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI; // Needed for UI
|
||||
using System.Collections;
|
||||
using TMPro; // Optional, if you want "Sweet Dreams" text
|
||||
|
||||
public class WinZone : MonoBehaviour
|
||||
{
|
||||
[Header("UI Settings")]
|
||||
public GameObject blackScreenPanel;
|
||||
public TextMeshProUGUI winText; // Assign a TMP text that says "Sweet Dreams"
|
||||
public float fadeDuration = 3f;
|
||||
|
||||
[Header("Audio")]
|
||||
public AudioSource playerAudioSource; // To stop footsteps/breathing
|
||||
public AudioClip winSound; // Gentle lullaby or peaceful sound
|
||||
|
||||
private bool hasWon = false;
|
||||
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Player") && !hasWon)
|
||||
{
|
||||
// Only win if lights are OFF (optional check)
|
||||
if (GameManager.Instance != null && !GameManager.Instance.AreAnyLightsOn())
|
||||
{
|
||||
StartCoroutine(WinSequence(other.gameObject));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator WinSequence(GameObject player)
|
||||
{
|
||||
hasWon = true;
|
||||
Debug.Log("Player reached the top! Winning...");
|
||||
|
||||
// 1. Disable Player Controls immediately
|
||||
PlayerController pc = player.GetComponent<PlayerController>();
|
||||
if (pc != null) pc.enabled = false;
|
||||
|
||||
// 2. Disable the Staircase Curse so they don't die while fading
|
||||
StaircaseCurse curse = FindObjectOfType<StaircaseCurse>();
|
||||
if (curse != null) curse.enabled = false;
|
||||
|
||||
// 3. Play Win Sound
|
||||
if (playerAudioSource != null && winSound != null)
|
||||
playerAudioSource.PlayOneShot(winSound);
|
||||
|
||||
// 4. Fade to Black
|
||||
if (blackScreenPanel != null)
|
||||
{
|
||||
blackScreenPanel.SetActive(true);
|
||||
CanvasGroup cg = blackScreenPanel.GetComponent<CanvasGroup>();
|
||||
|
||||
// If no CanvasGroup exists, add one
|
||||
if (cg == null) cg = blackScreenPanel.AddComponent<CanvasGroup>();
|
||||
|
||||
float timer = 0f;
|
||||
while (timer < fadeDuration)
|
||||
{
|
||||
timer += Time.deltaTime;
|
||||
cg.alpha = timer / fadeDuration; // Fade from 0 to 1
|
||||
yield return null;
|
||||
}
|
||||
cg.alpha = 1f;
|
||||
}
|
||||
|
||||
// 5. Show Text
|
||||
if (winText != null) winText.gameObject.SetActive(true);
|
||||
|
||||
// 6. Quit Game (or wait and load menu)
|
||||
yield return new WaitForSeconds(3f);
|
||||
Debug.Log("Quitting Application...");
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/WinZone.cs.meta
Normal file
2
Assets/Scripts/WinZone.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66ef2fa00c381c2488388b8b3eaf6a46
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _COLORCOLOR_ON
|
||||
- _EMISSION
|
||||
- _FADING_ON
|
||||
- _SOFTPARTICLES_ON
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Neon_Fast_02
|
||||
m_Shader: {fileID: 4800000, guid: 325b924500ba5804aa4b407d80084502, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
@@ -39,14 +43,32 @@ Material:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaCutoff: 0.5
|
||||
- _Brightness: 3.5
|
||||
- _EnvironmentReflections: 1
|
||||
- _Int1: 6
|
||||
- _Metallic: 0
|
||||
- _NormalAmount: 1
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Saturation: 1.75
|
||||
- _Smoothness: 0.2
|
||||
- _SpecularHighlights: 1
|
||||
- _UVScrollSpeed: 0.1
|
||||
- _VShift: 0
|
||||
- __dirty: 0
|
||||
@@ -54,3 +76,4 @@ Material:
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Tint: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
@@ -2,20 +2,24 @@
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 6
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Neon_Slow_01
|
||||
m_Shader: {fileID: 4800000, guid: 325b924500ba5804aa4b407d80084502, type: 3}
|
||||
m_ShaderKeywords:
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 2
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
@@ -39,14 +43,32 @@ Material:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaCutoff: 0.5
|
||||
- _Brightness: 3.5
|
||||
- _EnvironmentReflections: 1
|
||||
- _Int1: 6
|
||||
- _Metallic: 0
|
||||
- _NormalAmount: 1
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Saturation: 1.75
|
||||
- _Smoothness: 0.2
|
||||
- _SpecularHighlights: 1
|
||||
- _UVScrollSpeed: 0.75
|
||||
- _VShift: 0
|
||||
- __dirty: 0
|
||||
@@ -54,3 +76,4 @@ Material:
|
||||
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Tint: {r: 1, g: 1, b: 1, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
@@ -10,7 +10,7 @@ public class CarouselController : MonoBehaviour
|
||||
|
||||
[Header("Base Platform")]
|
||||
public GameObject Platform;
|
||||
|
||||
|
||||
[Header("Cranks")]
|
||||
public Transform[] Cranks;
|
||||
|
||||
@@ -23,7 +23,7 @@ public class CarouselController : MonoBehaviour
|
||||
//rotate cranks based on ride speed
|
||||
foreach (Transform crank in Cranks)
|
||||
{
|
||||
crank.Rotate(Vector3.forward * (rideSpeed*1.25f) * Time.deltaTime * 10);
|
||||
crank.Rotate(Vector3.forward * (rideSpeed * 1.25f) * Time.deltaTime * 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,13 +51,13 @@ public class clownEntranceController : MonoBehaviour
|
||||
//Apply rotation to each eye
|
||||
foreach (Transform eyeball in eyeballs)
|
||||
{
|
||||
|
||||
|
||||
eyeball.localRotation = Quaternion.Slerp(eyeball.localRotation, targetRotation, elapsedTime);
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
// Delay before next eye movement
|
||||
yield return new WaitForSeconds(Random.Range(frequency * 0.75f, frequency * 1.5f));
|
||||
yield return new WaitForSeconds(Random.Range(frequency * 0.75f, frequency * 1.5f));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class ClownGameController : MonoBehaviour
|
||||
private float timeCounter = 0.0f;
|
||||
public float rotationAmount = 40f;
|
||||
|
||||
[Range(0,5)]
|
||||
[Range(0, 5)]
|
||||
public float speed = 0.5f;
|
||||
|
||||
private void Update()
|
||||
|
||||
@@ -33,10 +33,10 @@ public class FerrisWheelController : MonoBehaviour
|
||||
|
||||
//chair rocking motion
|
||||
foreach (Transform chair in chairs)
|
||||
{
|
||||
{
|
||||
timeCounter += rockingSpeed * Time.deltaTime;
|
||||
// rotation speed added to reduce/add more motion depending on ferris wheel speed
|
||||
float rockingOffset = Mathf.Sin(timeCounter) * rockingAmplitude * (rotationSpeed/10);
|
||||
float rockingOffset = Mathf.Sin(timeCounter) * rockingAmplitude * (rotationSpeed / 10);
|
||||
chair.localRotation = Quaternion.Euler(0, 0, rockingOffset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class SimpleRotateCarnival : MonoBehaviour
|
||||
{
|
||||
|
||||
|
||||
public bool rotX;
|
||||
public float rotXSpeed = 50f;
|
||||
public bool rotY;
|
||||
@@ -31,5 +31,5 @@ public class SimpleRotateCarnival : MonoBehaviour
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,20 +8,20 @@ public class TeaCupController : MonoBehaviour
|
||||
public GameObject teaPot;
|
||||
public Transform[] teaCups;
|
||||
|
||||
[Range(-60,60)]
|
||||
public float rideSpeed = 15.0f;
|
||||
[Range(-60, 60)]
|
||||
public float rideSpeed = 15.0f;
|
||||
void Update()
|
||||
{
|
||||
//main platform rotation speed
|
||||
platform.transform.Rotate(Vector3.up * rideSpeed * Time.deltaTime);
|
||||
|
||||
//centre ornament (teapot) rotation speed
|
||||
teaPot.transform.Rotate(Vector3.down * (rideSpeed*0.5f) * Time.deltaTime);
|
||||
teaPot.transform.Rotate(Vector3.down * (rideSpeed * 0.5f) * Time.deltaTime);
|
||||
|
||||
//tea cup rotation's in relation to set ride speed
|
||||
foreach (Transform teacup in teaCups)
|
||||
{
|
||||
teacup.Rotate(Vector3.up * (rideSpeed * 1.5f ) * Time.deltaTime);
|
||||
}
|
||||
{
|
||||
teacup.Rotate(Vector3.up * (rideSpeed * 1.5f) * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 74bf1351d85e78747b7b513adae3b9de, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
@@ -83,6 +83,7 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
@@ -114,6 +115,7 @@ Material:
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
||||
@@ -50,7 +50,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 494211a3f81a1b04b8df3af35e9c33e5, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
@@ -83,6 +83,7 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
@@ -114,6 +115,7 @@ Material:
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _EMISSION
|
||||
m_InvalidKeywords:
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
m_LightmapFlags: 6
|
||||
@@ -135,7 +136,7 @@ Material:
|
||||
- _BaseColor: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _Color: {r: 0.36078426, g: 0.09803916, b: 0.09803916, a: 0.8352941}
|
||||
- _EmisColor: {r: 0.36764705, g: 0.21626297, b: 0.23818752, a: 0}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
|
||||
@@ -26,6 +26,7 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _EMISSION
|
||||
m_InvalidKeywords:
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
m_LightmapFlags: 6
|
||||
@@ -135,7 +136,7 @@ Material:
|
||||
- _BaseColor: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _Color: {r: 0.36078426, g: 0.09803916, b: 0.09803916, a: 0.8352941}
|
||||
- _EmisColor: {r: 0.36764705, g: 0.21626297, b: 0.23818752, a: 0}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
|
||||
@@ -13,6 +13,7 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _EMISSION
|
||||
m_InvalidKeywords:
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
m_LightmapFlags: 6
|
||||
@@ -122,7 +123,7 @@ Material:
|
||||
- _BaseColor: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _Color: {r: 0.36078426, g: 0.09803916, b: 0.09803916, a: 0.8352941}
|
||||
- _EmisColor: {r: 0.36764705, g: 0.21626297, b: 0.23818752, a: 0}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
|
||||
@@ -13,6 +13,7 @@ Material:
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHATEST_ON
|
||||
- _EMISSION
|
||||
m_InvalidKeywords:
|
||||
- _FLIPBOOKBLENDING_OFF
|
||||
m_LightmapFlags: 6
|
||||
@@ -122,7 +123,7 @@ Material:
|
||||
- _BaseColor: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0}
|
||||
- _Color: {r: 0.3607843, g: 0.09803919, b: 0.09803919, a: 0.8352941}
|
||||
- _Color: {r: 0.36078426, g: 0.09803916, b: 0.09803916, a: 0.8352941}
|
||||
- _EmisColor: {r: 0.36764705, g: 0.21626297, b: 0.23818752, a: 0}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SoftParticleFadeParams: {r: 0, g: 0, b: 0, a: 0}
|
||||
|
||||
@@ -51,7 +51,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: 35a81d8b499a111438ee1c6605e69851, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
@@ -84,6 +84,7 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaToMask: 1
|
||||
- _Blend: 0
|
||||
@@ -115,10 +116,11 @@ Material:
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.875, g: 0.6847363, b: 0.4439338, a: 1}
|
||||
- _Color: {r: 0.875, g: 0.6847363, b: 0.4439338, a: 1}
|
||||
- _Color: {r: 0.875, g: 0.6847363, b: 0.44393378, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
||||
@@ -51,7 +51,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: b8c3608b57a171148a930f513571228f, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
@@ -84,6 +84,7 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaToMask: 1
|
||||
- _Blend: 0
|
||||
@@ -115,6 +116,7 @@ Material:
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.541, g: 0.541, b: 0.541, a: 1}
|
||||
|
||||
@@ -64,7 +64,7 @@ Material:
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Texture: {fileID: 2800000, guid: ddc690733d7c67a4e912bfb0b0cf866e, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
@@ -97,6 +97,7 @@ Material:
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 1
|
||||
- _AlphaToMask: 1
|
||||
- _Blend: 0
|
||||
@@ -128,6 +129,7 @@ Material:
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _XRMotionVectorsPass: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
|
||||
@@ -843,8 +843,8 @@ PlayerSettings:
|
||||
editorAssembliesCompatibilityLevel: 1
|
||||
m_RenderingPath: 1
|
||||
m_MobileRenderingPath: 1
|
||||
metroPackageName: Stair_Horror
|
||||
metroPackageVersion:
|
||||
metroPackageName: StairHorror
|
||||
metroPackageVersion: 1.0.0.0
|
||||
metroCertificatePath:
|
||||
metroCertificatePassword:
|
||||
metroCertificateSubject:
|
||||
@@ -852,7 +852,7 @@ PlayerSettings:
|
||||
metroCertificateNotAfter: 0000000000000000
|
||||
metroApplicationDescription: Stair_Horror
|
||||
wsaImages: {}
|
||||
metroTileShortName:
|
||||
metroTileShortName: Stair_Horror
|
||||
metroTileShowName: 0
|
||||
metroMediumTileShowName: 0
|
||||
metroLargeTileShowName: 0
|
||||
|
||||
Reference in New Issue
Block a user