Skip to content

Commit 656b029

Browse files
Merge pull request #14 from PresenceOP-Coder/main
Adds the level progression and difficulty system.
2 parents 3e0fa3f + 9b60b75 commit 656b029

File tree

166 files changed

+24953
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+24953
-23
lines changed

Assets/GameOver.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,43 @@
33

44
public class GameOverMenu : MonoBehaviour
55
{
6+
[Tooltip("If set, this scene name will be loaded when Retry is pressed.")]
7+
public string retrySceneName = "";
8+
9+
[Tooltip("Fallback build index to load when Retry is pressed. Use -1 to ignore.")]
10+
public int retrySceneBuildIndex = -1;
11+
12+
[Tooltip("Optional PlayerPrefs key that stores the last played level build index. If set and present, it will be used as a fallback.")]
13+
public string lastLevelPrefsKey = "LastLevelIndex";
14+
615
public void Retry()
716
{
17+
// 1) If scene name provided in inspector, load it
18+
if (!string.IsNullOrEmpty(retrySceneName))
19+
{
20+
SceneManager.LoadScene(retrySceneName);
21+
return;
22+
}
23+
24+
// 2) If a valid build index is provided in inspector, load it
25+
if (retrySceneBuildIndex >= 0)
26+
{
27+
SceneManager.LoadScene(retrySceneBuildIndex);
28+
return;
29+
}
30+
31+
// 3) If a PlayerPrefs key exists with last level index, use that
32+
if (!string.IsNullOrEmpty(lastLevelPrefsKey) && PlayerPrefs.HasKey(lastLevelPrefsKey))
33+
{
34+
int idx = PlayerPrefs.GetInt(lastLevelPrefsKey, -1);
35+
if (idx >= 0)
36+
{
37+
SceneManager.LoadScene(idx);
38+
return;
39+
}
40+
}
41+
42+
// 4) Fallback to the previous hard-coded behaviour (scene index 1)
843
SceneManager.LoadScene(1);
944
}
1045

Assets/MainMenu.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@
33

44
public class MainMenu : MonoBehaviour
55
{
6+
[Tooltip("Name of the scene to open when Play is clicked. If empty, Build Index below will be used.")]
7+
public string levelSelectSceneName = "Levels";
8+
9+
[Tooltip("Fallback build index to load if the scene name is empty or not set in Inspector.")]
10+
public int levelSelectBuildIndex = 1;
11+
12+
// Called by the Play button on the main menu. By default it will open the Level Select scene.
613
public void PlayGame()
714
{
8-
SceneManager.LoadScene(1);
15+
if (!string.IsNullOrEmpty(levelSelectSceneName))
16+
{
17+
SceneManager.LoadScene(levelSelectSceneName);
18+
}
19+
else
20+
{
21+
SceneManager.LoadScene(levelSelectBuildIndex);
22+
}
923
}
1024

1125
public void QuitGame()

Assets/Materials/Skybox1.mat

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 8
6+
m_ObjectHideFlags: 0
7+
m_CorrespondingSourceObject: {fileID: 0}
8+
m_PrefabInstance: {fileID: 0}
9+
m_PrefabAsset: {fileID: 0}
10+
m_Name: Skybox1
11+
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
12+
m_Parent: {fileID: 0}
13+
m_ModifiedSerializedProperties: 0
14+
m_ValidKeywords:
15+
- _SUNDISK_HIGH_QUALITY
16+
m_InvalidKeywords: []
17+
m_LightmapFlags: 4
18+
m_EnableInstancingVariants: 0
19+
m_DoubleSidedGI: 0
20+
m_CustomRenderQueue: -1
21+
stringTagMap: {}
22+
disabledShaderPasses:
23+
- MOTIONVECTORS
24+
m_LockedProperties:
25+
m_SavedProperties:
26+
serializedVersion: 3
27+
m_TexEnvs:
28+
- _BaseMap:
29+
m_Texture: {fileID: 0}
30+
m_Scale: {x: 1, y: 1}
31+
m_Offset: {x: 0, y: 0}
32+
- _BumpMap:
33+
m_Texture: {fileID: 0}
34+
m_Scale: {x: 1, y: 1}
35+
m_Offset: {x: 0, y: 0}
36+
- _DetailAlbedoMap:
37+
m_Texture: {fileID: 0}
38+
m_Scale: {x: 1, y: 1}
39+
m_Offset: {x: 0, y: 0}
40+
- _DetailMask:
41+
m_Texture: {fileID: 0}
42+
m_Scale: {x: 1, y: 1}
43+
m_Offset: {x: 0, y: 0}
44+
- _DetailNormalMap:
45+
m_Texture: {fileID: 0}
46+
m_Scale: {x: 1, y: 1}
47+
m_Offset: {x: 0, y: 0}
48+
- _EmissionMap:
49+
m_Texture: {fileID: 0}
50+
m_Scale: {x: 1, y: 1}
51+
m_Offset: {x: 0, y: 0}
52+
- _MainTex:
53+
m_Texture: {fileID: 0}
54+
m_Scale: {x: 1, y: 1}
55+
m_Offset: {x: 0, y: 0}
56+
- _MetallicGlossMap:
57+
m_Texture: {fileID: 0}
58+
m_Scale: {x: 1, y: 1}
59+
m_Offset: {x: 0, y: 0}
60+
- _OcclusionMap:
61+
m_Texture: {fileID: 0}
62+
m_Scale: {x: 1, y: 1}
63+
m_Offset: {x: 0, y: 0}
64+
- _ParallaxMap:
65+
m_Texture: {fileID: 0}
66+
m_Scale: {x: 1, y: 1}
67+
m_Offset: {x: 0, y: 0}
68+
- _SpecGlossMap:
69+
m_Texture: {fileID: 0}
70+
m_Scale: {x: 1, y: 1}
71+
m_Offset: {x: 0, y: 0}
72+
- unity_Lightmaps:
73+
m_Texture: {fileID: 0}
74+
m_Scale: {x: 1, y: 1}
75+
m_Offset: {x: 0, y: 0}
76+
- unity_LightmapsInd:
77+
m_Texture: {fileID: 0}
78+
m_Scale: {x: 1, y: 1}
79+
m_Offset: {x: 0, y: 0}
80+
- unity_ShadowMasks:
81+
m_Texture: {fileID: 0}
82+
m_Scale: {x: 1, y: 1}
83+
m_Offset: {x: 0, y: 0}
84+
m_Ints: []
85+
m_Floats:
86+
- _AddPrecomputedVelocity: 0
87+
- _AlphaClip: 0
88+
- _AlphaToMask: 0
89+
- _AtmosphereThickness: 0.69
90+
- _Blend: 0
91+
- _BlendModePreserveSpecular: 1
92+
- _BumpScale: 1
93+
- _ClearCoatMask: 0
94+
- _ClearCoatSmoothness: 0
95+
- _Cull: 2
96+
- _Cutoff: 0.5
97+
- _DetailAlbedoMapScale: 1
98+
- _DetailNormalMapScale: 1
99+
- _DstBlend: 0
100+
- _DstBlendAlpha: 0
101+
- _EnvironmentReflections: 1
102+
- _Exposure: 1.34
103+
- _GlossMapScale: 0
104+
- _Glossiness: 0
105+
- _GlossyReflections: 0
106+
- _Metallic: 0
107+
- _OcclusionStrength: 1
108+
- _Parallax: 0.005
109+
- _QueueOffset: 0
110+
- _ReceiveShadows: 1
111+
- _Smoothness: 0.5
112+
- _SmoothnessTextureChannel: 0
113+
- _SpecularHighlights: 1
114+
- _SrcBlend: 1
115+
- _SrcBlendAlpha: 1
116+
- _SunDisk: 2
117+
- _SunSize: 0.04
118+
- _SunSizeConvergence: 5.5
119+
- _Surface: 0
120+
- _WorkflowMode: 1
121+
- _ZWrite: 1
122+
m_Colors:
123+
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
124+
- _Color: {r: 1, g: 1, b: 1, a: 1}
125+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
126+
- _GroundColor: {r: 0.36899996, g: 0.34899998, b: 0.34099993, a: 1}
127+
- _SkyTint: {r: 0.8280792, g: 0, b: 1, a: 1}
128+
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
129+
m_BuildTextureStacks: []
130+
m_AllowLocking: 1
131+
--- !u!114 &8842780063782161953
132+
MonoBehaviour:
133+
m_ObjectHideFlags: 11
134+
m_CorrespondingSourceObject: {fileID: 0}
135+
m_PrefabInstance: {fileID: 0}
136+
m_PrefabAsset: {fileID: 0}
137+
m_GameObject: {fileID: 0}
138+
m_Enabled: 1
139+
m_EditorHideFlags: 0
140+
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
141+
m_Name:
142+
m_EditorClassIdentifier:
143+
version: 10

Assets/Materials/Skybox1.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Materials/Skybox2.mat

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!21 &2100000
4+
Material:
5+
serializedVersion: 8
6+
m_ObjectHideFlags: 0
7+
m_CorrespondingSourceObject: {fileID: 0}
8+
m_PrefabInstance: {fileID: 0}
9+
m_PrefabAsset: {fileID: 0}
10+
m_Name: Skybox2
11+
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
12+
m_Parent: {fileID: 0}
13+
m_ModifiedSerializedProperties: 0
14+
m_ValidKeywords:
15+
- _SUNDISK_HIGH_QUALITY
16+
m_InvalidKeywords: []
17+
m_LightmapFlags: 4
18+
m_EnableInstancingVariants: 0
19+
m_DoubleSidedGI: 0
20+
m_CustomRenderQueue: -1
21+
stringTagMap: {}
22+
disabledShaderPasses:
23+
- MOTIONVECTORS
24+
m_LockedProperties:
25+
m_SavedProperties:
26+
serializedVersion: 3
27+
m_TexEnvs:
28+
- _BaseMap:
29+
m_Texture: {fileID: 0}
30+
m_Scale: {x: 1, y: 1}
31+
m_Offset: {x: 0, y: 0}
32+
- _BumpMap:
33+
m_Texture: {fileID: 0}
34+
m_Scale: {x: 1, y: 1}
35+
m_Offset: {x: 0, y: 0}
36+
- _DetailAlbedoMap:
37+
m_Texture: {fileID: 0}
38+
m_Scale: {x: 1, y: 1}
39+
m_Offset: {x: 0, y: 0}
40+
- _DetailMask:
41+
m_Texture: {fileID: 0}
42+
m_Scale: {x: 1, y: 1}
43+
m_Offset: {x: 0, y: 0}
44+
- _DetailNormalMap:
45+
m_Texture: {fileID: 0}
46+
m_Scale: {x: 1, y: 1}
47+
m_Offset: {x: 0, y: 0}
48+
- _EmissionMap:
49+
m_Texture: {fileID: 0}
50+
m_Scale: {x: 1, y: 1}
51+
m_Offset: {x: 0, y: 0}
52+
- _MainTex:
53+
m_Texture: {fileID: 0}
54+
m_Scale: {x: 1, y: 1}
55+
m_Offset: {x: 0, y: 0}
56+
- _MetallicGlossMap:
57+
m_Texture: {fileID: 0}
58+
m_Scale: {x: 1, y: 1}
59+
m_Offset: {x: 0, y: 0}
60+
- _OcclusionMap:
61+
m_Texture: {fileID: 0}
62+
m_Scale: {x: 1, y: 1}
63+
m_Offset: {x: 0, y: 0}
64+
- _ParallaxMap:
65+
m_Texture: {fileID: 0}
66+
m_Scale: {x: 1, y: 1}
67+
m_Offset: {x: 0, y: 0}
68+
- _SpecGlossMap:
69+
m_Texture: {fileID: 0}
70+
m_Scale: {x: 1, y: 1}
71+
m_Offset: {x: 0, y: 0}
72+
- unity_Lightmaps:
73+
m_Texture: {fileID: 0}
74+
m_Scale: {x: 1, y: 1}
75+
m_Offset: {x: 0, y: 0}
76+
- unity_LightmapsInd:
77+
m_Texture: {fileID: 0}
78+
m_Scale: {x: 1, y: 1}
79+
m_Offset: {x: 0, y: 0}
80+
- unity_ShadowMasks:
81+
m_Texture: {fileID: 0}
82+
m_Scale: {x: 1, y: 1}
83+
m_Offset: {x: 0, y: 0}
84+
m_Ints: []
85+
m_Floats:
86+
- _AddPrecomputedVelocity: 0
87+
- _AlphaClip: 0
88+
- _AlphaToMask: 0
89+
- _AtmosphereThickness: 3.2
90+
- _Blend: 0
91+
- _BlendModePreserveSpecular: 1
92+
- _BumpScale: 1
93+
- _ClearCoatMask: 0
94+
- _ClearCoatSmoothness: 0
95+
- _Cull: 2
96+
- _Cutoff: 0.5
97+
- _DetailAlbedoMapScale: 1
98+
- _DetailNormalMapScale: 1
99+
- _DstBlend: 0
100+
- _DstBlendAlpha: 0
101+
- _EnvironmentReflections: 1
102+
- _Exposure: 0.07
103+
- _GlossMapScale: 0
104+
- _Glossiness: 0
105+
- _GlossyReflections: 0
106+
- _Metallic: 0
107+
- _OcclusionStrength: 1
108+
- _Parallax: 0.005
109+
- _QueueOffset: 0
110+
- _ReceiveShadows: 1
111+
- _Smoothness: 0.5
112+
- _SmoothnessTextureChannel: 0
113+
- _SpecularHighlights: 1
114+
- _SrcBlend: 1
115+
- _SrcBlendAlpha: 1
116+
- _SunDisk: 2
117+
- _SunSize: 0.137
118+
- _SunSizeConvergence: 4.96
119+
- _Surface: 0
120+
- _WorkflowMode: 1
121+
- _ZWrite: 1
122+
m_Colors:
123+
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
124+
- _Color: {r: 1, g: 1, b: 1, a: 1}
125+
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
126+
- _GroundColor: {r: 0.36899996, g: 0.34899998, b: 0.34099993, a: 1}
127+
- _SkyTint: {r: 1, g: 0.25708732, b: 0, a: 1}
128+
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
129+
m_BuildTextureStacks: []
130+
m_AllowLocking: 1
131+
--- !u!114 &8842780063782161953
132+
MonoBehaviour:
133+
m_ObjectHideFlags: 11
134+
m_CorrespondingSourceObject: {fileID: 0}
135+
m_PrefabInstance: {fileID: 0}
136+
m_PrefabAsset: {fileID: 0}
137+
m_GameObject: {fileID: 0}
138+
m_Enabled: 1
139+
m_EditorHideFlags: 0
140+
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
141+
m_Name:
142+
m_EditorClassIdentifier:
143+
version: 10

Assets/Materials/Skybox2.mat.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)