Create Menu

I have implemented the menu and in case of death, it will throw the player onto the menu stage.
This commit is contained in:
Max_Divizion 2025-01-21 17:13:52 +03:00
parent 7ad7cd5566
commit 8f5aef3424
32 changed files with 5067 additions and 2 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8b96405b08697fa4995a503a12bfa19d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 75bed502f6d2c7649963b6a2218a1b53
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d82faf572f34c4f449c8ffe837bd136b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,350 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-5820984859118941298
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: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 12
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:
--- !u!114 &-4862350560549843436
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fade Screen Material
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 1
m_CustomRenderQueue: 3002
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- SHADOWCASTER
- DepthOnly
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AnisotropyMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BentNormalMapOS:
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}
- _CoatMaskMap:
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}
- _DetailMap:
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}
- _EmissiveColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _HeightMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _IridescenceThicknessMap:
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}
- _MaskMap:
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}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMapOS:
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}
- _SpecularColorMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SubsurfaceMaskMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TangentMapOS:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThicknessMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TransmittanceColorMap:
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:
- _AORemapMax: 1
- _AORemapMin: 0
- _ATDistance: 1
- _AddPrecomputedVelocity: 0
- _AlbedoAffectEmissive: 0
- _AlphaClip: 0
- _AlphaCutoff: 0.5
- _AlphaCutoffEnable: 0
- _AlphaCutoffPostpass: 0.5
- _AlphaCutoffPrepass: 0.5
- _AlphaCutoffShadow: 0.5
- _AlphaDstBlend: 10
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _AlphaToMaskInspectorValue: 0
- _Anisotropy: 0
- _Blend: 0
- _BlendMode: 0
- _BlendModePreserveSpecular: 0
- _BlendOp: 0
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _CoatMask: 0
- _Cull: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailAlbedoMapScale: 1
- _DetailAlbedoScale: 1
- _DetailNormalMapScale: 1
- _DetailNormalScale: 1
- _DetailSmoothnessScale: 1
- _DiffusionProfile: 0
- _DiffusionProfileHash: 0
- _DisplacementLockObjectScale: 1
- _DisplacementLockTilingScale: 1
- _DisplacementMode: 0
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 1
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EmissiveColorMode: 1
- _EmissiveExposureWeight: 1
- _EmissiveIntensity: 1
- _EmissiveIntensityUnit: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _EnableGeometricSpecularAA: 0
- _EnergyConservingSpecularColor: 1
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _HeightAmplitude: 0.02
- _HeightCenter: 0.5
- _HeightMapParametrization: 0
- _HeightMax: 1
- _HeightMin: -1
- _HeightOffset: 0
- _HeightPoMAmplitude: 2
- _HeightTessAmplitude: 2
- _HeightTessCenter: 0.5
- _InvTilingScale: 1
- _Ior: 1.5
- _IridescenceMask: 1
- _IridescenceThickness: 1
- _LinkDetailsWithBase: 1
- _MaterialID: 1
- _Metallic: 0
- _MetallicRemapMax: 0
- _MetallicRemapMin: 0
- _NormalMapSpace: 0
- _NormalScale: 1
- _OcclusionStrength: 1
- _OpaqueCullMode: 2
- _PPDLodThreshold: 5
- _PPDMaxSamples: 15
- _PPDMinSamples: 5
- _PPDPrimitiveLength: 1
- _PPDPrimitiveWidth: 1
- _Parallax: 0.005
- _QueueOffset: 2
- _RayTracing: 0
- _ReceiveShadows: 1
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _SampleGI: 0
- _Smoothness: 0.5
- _SmoothnessRemapMax: 1
- _SmoothnessRemapMin: 0
- _SmoothnessTextureChannel: 0
- _SpecularAAScreenSpaceVariance: 0.1
- _SpecularAAThreshold: 0.2
- _SpecularHighlights: 1
- _SpecularOcclusionMode: 1
- _SrcBlend: 5
- _SrcBlendAlpha: 1
- _StencilRef: 0
- _StencilRefDepth: 0
- _StencilRefGBuffer: 2
- _StencilRefMV: 32
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 8
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SubsurfaceMask: 1
- _SupportDecals: 1
- _Surface: 1
- _SurfaceType: 1
- _TexWorldScale: 1
- _TexWorldScaleEmissive: 1
- _Thickness: 1
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVBase: 0
- _UVDetail: 0
- _UVEmissive: 0
- _UseEmissiveIntensity: 0
- _UseShadowThreshold: 0
- _WorkflowMode: 1
- _ZTestDepthEqualForOpaque: 4
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 0}
- _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissiveColor: {r: 0, g: 0, b: 0, a: 1}
- _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1}
- _InvPrimScale: {r: 1, g: 1, b: 0, a: 0}
- _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0}
- _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1}
- _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMask: {r: 1, g: 0, b: 0, a: 0}
- _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 12ed28e894f164b4ebe161f47489fadb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Game Menu ground
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: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 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: 10300, guid: 0000000000000000f000000000000000, type: 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:
- _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.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.7433963, g: 0.7433963, b: 0.7433963, a: 0}
- _Color: {r: 0.7433963, g: 0.7433963, b: 0.7433963, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &8370401822028954584
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:
version: 7

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 742bade37b0e25b4bb98f782b8dcd549
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3259326977460705006
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:
version: 7
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Reticle
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: []
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:
- _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.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.8668773, b: 1, a: 1}
- _Color: {r: 0, g: 0.86687726, b: 1, 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: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8c25bbd1589ee4449bd445058bb40d0e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4304fdc9ff8ed0a40ba0cb1c4b58c453
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 517312fa659ce3d4297983b3b5a8ddd0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 791b1ec1bc48e15488404dade6264a7d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8bb80d7fa5e17064493146fee92d49b7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,76 @@
using UnityEngine.Audio;
using System;
using UnityEngine;
//Credit to Brackeys youtube tutorial on Audio managers, as the majority of this code and learning how to use it was made by him.
[System.Serializable]
public class Sound
{
public string name;
public AudioClip clip;
[Range(0,1)]
public float volume = 1;
[Range(-3,3)]
public float pitch = 1;
public bool loop = false;
public AudioSource source;
public Sound()
{
volume = 1;
pitch = 1;
loop = false;
}
}
public class AudioManager : MonoBehaviour
{
public Sound[] sounds;
public static AudioManager instance;
//AudioManager
void Awake()
{
if (instance == null)
instance = this;
else
{
Destroy(gameObject);
return;
}
DontDestroyOnLoad(gameObject);
foreach (Sound s in sounds)
{
if(!s.source)
s.source = gameObject.AddComponent<AudioSource>();
s.source.clip = s.clip;
s.source.volume = s.volume;
s.source.pitch = s.pitch;
s.source.loop = s.loop;
}
}
public void Play(string name)
{
Sound s = Array.Find(sounds, sound => sound.name == name);
if (s == null)
{
Debug.LogWarning("Sound: " + name + " not found");
return;
}
s.source.Play();
}
public void Stop(string name)
{
Sound s = Array.Find(sounds, sound => sound.name == name);
s.source.Stop();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0dc44c5eb69748a45b697397b0740ef1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,62 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FadeScreen : MonoBehaviour
{
public bool fadeOnStart = true;
public float fadeDuration = 2;
public Color fadeColor;
public AnimationCurve fadeCurve;
public string colorPropertyName = "_Color";
private Renderer rend;
// Start is called before the first frame update
void Start()
{
rend = GetComponent<Renderer>();
rend.enabled = false;
if (fadeOnStart)
FadeIn();
}
public void FadeIn()
{
Fade(1, 0);
}
public void FadeOut()
{
Fade(0, 1);
}
public void Fade(float alphaIn, float alphaOut)
{
StartCoroutine(FadeRoutine(alphaIn,alphaOut));
}
public IEnumerator FadeRoutine(float alphaIn,float alphaOut)
{
rend.enabled = true;
float timer = 0;
while(timer <= fadeDuration)
{
Color newColor = fadeColor;
newColor.a = Mathf.Lerp(alphaIn, alphaOut, fadeCurve.Evaluate(timer / fadeDuration));
rend.material.SetColor(colorPropertyName, newColor);
timer += Time.deltaTime;
yield return null;
}
Color newColor2 = fadeColor;
newColor2.a = alphaOut;
rend.material.SetColor(colorPropertyName, newColor2);
if(alphaOut == 0)
rend.enabled = false;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7c2d507c3ae9dc744a28e79d568b5806
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,58 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class GameStartMenu : MonoBehaviour
{
[Header("UI Pages")]
public GameObject mainMenu;
[Header("Main Menu Buttons")]
public Button startButton;
public Button quitButton;
void Start()
{
EnableMainMenu();
//Hook events
startButton.onClick.AddListener(StartGame);
quitButton.onClick.AddListener(QuitGame);
}
public void QuitGame()
{
Application.Quit();
}
public void StartGame()
{
HideAll();
SceneTransitionManager.singleton.GoToSceneAsync(1);
}
public void HideAll()
{
mainMenu.SetActive(false);
}
public void EnableMainMenu()
{
mainMenu.SetActive(true);
}
public void EnableOption()
{
mainMenu.SetActive(false);
}
public void EnableAbout()
{
mainMenu.SetActive(false);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: af07645f3014a1347a5b1232afc24251
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,64 @@
Shader "Custom/GradientSkybox" {
Properties {
_Color2 ("Top Color", Color) = (0.97, 0.67, 0.51, 0)
_Color1 ("Bottom Color", Color) = (0, 0.7, 0.74, 0)
[Space]
_Intensity ("Intensity", Range (0, 2)) = 1.0
_Exponent ("Exponent", Range (0, 3)) = 1.0
[HideInInspector]
_Direction ("Direction", Vector) = (0, 1, 0, 0)
}
CGINCLUDE
#include "UnityCG.cginc"
struct appdata {
float4 position : POSITION;
float3 texcoord : TEXCOORD0;
};
struct v2f {
float4 position : SV_POSITION;
float3 texcoord : TEXCOORD0;
};
half4 _Color1;
half4 _Color2;
half3 _Direction;
half _Intensity;
half _Exponent;
v2f vert (appdata v) {
v2f o;
o.position = UnityObjectToClipPos(v.position);
o.texcoord = v.texcoord;
return o;
}
fixed4 frag (v2f i) : COLOR {
half d = dot(normalize(i.texcoord), _Direction) * 0.5f + 0.5f;
return lerp (_Color1, _Color2, pow(d, _Exponent)) * _Intensity;
}
ENDCG
SubShader {
Tags { "RenderType"="Background" "Queue"="Background" }
Pass {
ZClip False
ZWrite Off
Cull Off
Fog { Mode Off }
CGPROGRAM
#pragma fragmentoption ARB_precision_hint_fastest
#pragma vertex vert
#pragma fragment frag
ENDCG
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f870c618efe6c2d499bb28b864be41a9
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
preprocessorOverride: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneTransitionManager : MonoBehaviour
{
public FadeScreen fadeScreen;
public static SceneTransitionManager singleton;
private void Awake()
{
if (singleton && singleton != this)
Destroy(singleton);
singleton = this;
}
public void GoToScene(int sceneIndex)
{
StartCoroutine(GoToSceneRoutine(sceneIndex));
}
IEnumerator GoToSceneRoutine(int sceneIndex)
{
fadeScreen.FadeOut();
yield return new WaitForSeconds(fadeScreen.fadeDuration);
//Launch the new scene
SceneManager.LoadScene(sceneIndex);
}
public void GoToSceneAsync(int sceneIndex)
{
StartCoroutine(GoToSceneAsyncRoutine(sceneIndex));
}
IEnumerator GoToSceneAsyncRoutine(int sceneIndex)
{
fadeScreen.FadeOut();
//Launch the new scene
AsyncOperation operation = SceneManager.LoadSceneAsync(0);
operation.allowSceneActivation = false;
float timer = 0;
while(timer <= fadeScreen.fadeDuration && !operation.isDone)
{
timer += Time.deltaTime;
yield return null;
}
operation.allowSceneActivation = true;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7b29c9ee5eccc9a42a33231645d21941
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
using System.Collections;
using System.Collections.Generic;
using Unity.XR.CoreUtils;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.XR.Interaction.Toolkit;
public class SetOptionFromUI : MonoBehaviour
{
public Scrollbar volumeSlider;
public TMPro.TMP_Dropdown turnDropdown;
public SetTurnTypeFromPlayerPref turnTypeFromPlayerPref;
private void Start()
{
volumeSlider.onValueChanged.AddListener(SetGlobalVolume);
turnDropdown.onValueChanged.AddListener(SetTurnPlayerPref);
if (PlayerPrefs.HasKey("turn"))
turnDropdown.SetValueWithoutNotify(PlayerPrefs.GetInt("turn"));
}
public void SetGlobalVolume(float value)
{
AudioListener.volume = value;
}
public void SetTurnPlayerPref(int value)
{
PlayerPrefs.SetInt("turn", value);
turnTypeFromPlayerPref.ApplyPlayerPref();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8897d0c3fbd45634fb65a3a92dee951d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,38 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
public class SetTurnTypeFromPlayerPref : MonoBehaviour
{
public ActionBasedSnapTurnProvider snapTurn;
public ActionBasedContinuousTurnProvider continuousTurn;
// Start is called before the first frame update
void Start()
{
ApplyPlayerPref();
}
public void ApplyPlayerPref()
{
if(PlayerPrefs.HasKey("turn"))
{
int value = PlayerPrefs.GetInt("turn");
if(value == 0)
{
snapTurn.leftHandSnapTurnAction.action.Enable();
snapTurn.rightHandSnapTurnAction.action.Enable();
continuousTurn.leftHandTurnAction.action.Disable();
continuousTurn.rightHandTurnAction.action.Disable();
}
else if(value == 1)
{
snapTurn.leftHandSnapTurnAction.action.Disable();
snapTurn.rightHandSnapTurnAction.action.Disable();
continuousTurn.leftHandTurnAction.action.Enable();
continuousTurn.rightHandTurnAction.action.Enable();
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a5fc6632ed707ab4698ecc7d2baf862f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class UIAudio : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
{
public string clickAudioName;
public string hoverEnterAudioName;
public string hoverExitAudioName;
public void OnPointerClick(PointerEventData eventData)
{
if(clickAudioName != "")
{
AudioManager.instance.Play(clickAudioName);
}
}
public void OnPointerEnter(PointerEventData eventData)
{
if (hoverEnterAudioName != "")
{
AudioManager.instance.Play(hoverEnterAudioName);
}
}
public void OnPointerExit(PointerEventData eventData)
{
if (hoverExitAudioName != "")
{
AudioManager.instance.Play(hoverExitAudioName);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e419a4d4b65dfb94bae6eddedee04926
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -11,7 +11,7 @@ public class HitDetectorScript : MonoBehaviour
if (other.gameObject.CompareTag("Car")) if (other.gameObject.CompareTag("Car"))
{ {
Debug.Log("Player was hitted car"); Debug.Log("Player was hitted car");
SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().name); SceneManager.LoadSceneAsync(1);
} }
} }

View File

@ -4,7 +4,13 @@
EditorBuildSettings: EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: [] m_Scenes:
- enabled: 1
path: Assets/Crossy Road VR/Scenes/Game/Game Scence.unity
guid: 36ef3f733f54f0f4e92081e9c40663be
- enabled: 1
path: Assets/Crossy Road VR/Scenes/Menu/Scene/Menu.unity
guid: 517312fa659ce3d4297983b3b5a8ddd0
m_configObjects: m_configObjects:
com.unity.xr.management.loader_settings: {fileID: 11400000, guid: 10cc2b8f8b7bd7d47844b0b212f3ddab, type: 2} com.unity.xr.management.loader_settings: {fileID: 11400000, guid: 10cc2b8f8b7bd7d47844b0b212f3ddab, type: 2}
com.unity.xr.openxr.settings4: {fileID: 11400000, guid: b52963477cec96e4cb5192e84a2f113d, type: 2} com.unity.xr.openxr.settings4: {fileID: 11400000, guid: b52963477cec96e4cb5192e84a2f113d, type: 2}