Skip to content

Commit a7871e0

Browse files
Satvik-Singh192Just-Here-TO-Code
authored andcommitted
feat: added tips to main menu
1 parent 329e4ac commit a7871e0

File tree

5 files changed

+207
-19
lines changed

5 files changed

+207
-19
lines changed

Assets/Scenes/MainMenu.unity

Lines changed: 163 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -687,23 +687,17 @@ MonoBehaviour:
687687
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
688688
m_Name:
689689
m_EditorClassIdentifier:
690+
m_Version: 4
690691
m_UsePipelineSettings: 1
691692
m_AdditionalLightsShadowResolutionTier: 2
693+
m_LightLayerMask: 1
694+
m_RenderingLayers: 1
692695
m_CustomShadowLayers: 0
696+
m_ShadowLayerMask: 1
697+
m_ShadowRenderingLayers: 1
693698
m_LightCookieSize: {x: 1, y: 1}
694699
m_LightCookieOffset: {x: 0, y: 0}
695700
m_SoftShadowQuality: 0
696-
m_RenderingLayersMask:
697-
serializedVersion: 0
698-
m_Bits: 1
699-
m_ShadowRenderingLayersMask:
700-
serializedVersion: 0
701-
m_Bits: 1
702-
m_Version: 4
703-
m_LightLayerMask: 1
704-
m_ShadowLayerMask: 1
705-
m_RenderingLayers: 1
706-
m_ShadowRenderingLayers: 1
707701
--- !u!1 &894188157
708702
GameObject:
709703
m_ObjectHideFlags: 0
@@ -883,14 +877,14 @@ MonoBehaviour:
883877
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
884878
m_RequiresDepthTexture: 0
885879
m_RequiresColorTexture: 0
880+
m_Version: 2
886881
m_TaaSettings:
887882
m_Quality: 3
888883
m_FrameInfluence: 0.1
889884
m_JitterScale: 1
890885
m_MipBias: 0
891886
m_VarianceClampScale: 0.9
892887
m_ContrastAdaptiveSharpening: 0
893-
m_Version: 2
894888
--- !u!114 &944479919
895889
MonoBehaviour:
896890
m_ObjectHideFlags: 0
@@ -908,6 +902,162 @@ MonoBehaviour:
908902
highScoreText: {fileID: 0}
909903
highScoreTextLegacy: {fileID: 0}
910904
highScorePrefix: 'Best Time: '
905+
--- !u!1 &983268467
906+
GameObject:
907+
m_ObjectHideFlags: 0
908+
m_CorrespondingSourceObject: {fileID: 0}
909+
m_PrefabInstance: {fileID: 0}
910+
m_PrefabAsset: {fileID: 0}
911+
serializedVersion: 6
912+
m_Component:
913+
- component: {fileID: 983268468}
914+
- component: {fileID: 983268470}
915+
- component: {fileID: 983268469}
916+
- component: {fileID: 983268471}
917+
m_Layer: 5
918+
m_Name: TipsText
919+
m_TagString: Untagged
920+
m_Icon: {fileID: 0}
921+
m_NavMeshLayer: 0
922+
m_StaticEditorFlags: 0
923+
m_IsActive: 1
924+
--- !u!224 &983268468
925+
RectTransform:
926+
m_ObjectHideFlags: 0
927+
m_CorrespondingSourceObject: {fileID: 0}
928+
m_PrefabInstance: {fileID: 0}
929+
m_PrefabAsset: {fileID: 0}
930+
m_GameObject: {fileID: 983268467}
931+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
932+
m_LocalPosition: {x: 0, y: 0, z: 0}
933+
m_LocalScale: {x: 1, y: 1, z: 1}
934+
m_ConstrainProportionsScale: 0
935+
m_Children: []
936+
m_Father: {fileID: 1920255394}
937+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
938+
m_AnchorMin: {x: 0.5, y: 0.5}
939+
m_AnchorMax: {x: 0.5, y: 0.5}
940+
m_AnchoredPosition: {x: 10, y: 158}
941+
m_SizeDelta: {x: 900, y: 50}
942+
m_Pivot: {x: 0.5, y: 0.5}
943+
--- !u!114 &983268469
944+
MonoBehaviour:
945+
m_ObjectHideFlags: 0
946+
m_CorrespondingSourceObject: {fileID: 0}
947+
m_PrefabInstance: {fileID: 0}
948+
m_PrefabAsset: {fileID: 0}
949+
m_GameObject: {fileID: 983268467}
950+
m_Enabled: 1
951+
m_EditorHideFlags: 0
952+
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
953+
m_Name:
954+
m_EditorClassIdentifier:
955+
m_Material: {fileID: 0}
956+
m_Color: {r: 1, g: 1, b: 1, a: 1}
957+
m_RaycastTarget: 1
958+
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
959+
m_Maskable: 1
960+
m_OnCullStateChanged:
961+
m_PersistentCalls:
962+
m_Calls: []
963+
m_text: New Text
964+
m_isRightToLeft: 0
965+
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
966+
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
967+
m_fontSharedMaterials: []
968+
m_fontMaterial: {fileID: 0}
969+
m_fontMaterials: []
970+
m_fontColor32:
971+
serializedVersion: 2
972+
rgba: 4278190080
973+
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
974+
m_enableVertexGradient: 0
975+
m_colorMode: 3
976+
m_fontColorGradient:
977+
topLeft: {r: 1, g: 1, b: 1, a: 1}
978+
topRight: {r: 1, g: 1, b: 1, a: 1}
979+
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
980+
bottomRight: {r: 1, g: 1, b: 1, a: 1}
981+
m_fontColorGradientPreset: {fileID: 0}
982+
m_spriteAsset: {fileID: 0}
983+
m_tintAllSprites: 0
984+
m_StyleSheet: {fileID: 0}
985+
m_TextStyleHashCode: -1183493901
986+
m_overrideHtmlColors: 0
987+
m_faceColor:
988+
serializedVersion: 2
989+
rgba: 4294967295
990+
m_fontSize: 36
991+
m_fontSizeBase: 36
992+
m_fontWeight: 400
993+
m_enableAutoSizing: 0
994+
m_fontSizeMin: 18
995+
m_fontSizeMax: 72
996+
m_fontStyle: 1
997+
m_HorizontalAlignment: 1
998+
m_VerticalAlignment: 256
999+
m_textAlignment: 65535
1000+
m_characterSpacing: 0
1001+
m_wordSpacing: 0
1002+
m_lineSpacing: 0
1003+
m_lineSpacingMax: 0
1004+
m_paragraphSpacing: 0
1005+
m_charWidthMaxAdj: 0
1006+
m_TextWrappingMode: 1
1007+
m_wordWrappingRatios: 0.4
1008+
m_overflowMode: 0
1009+
m_linkedTextComponent: {fileID: 0}
1010+
parentLinkedComponent: {fileID: 0}
1011+
m_enableKerning: 0
1012+
m_ActiveFontFeatures: 6e72656b
1013+
m_enableExtraPadding: 0
1014+
checkPaddingRequired: 0
1015+
m_isRichText: 1
1016+
m_EmojiFallbackSupport: 1
1017+
m_parseCtrlCharacters: 1
1018+
m_isOrthographic: 1
1019+
m_isCullingEnabled: 0
1020+
m_horizontalMapping: 0
1021+
m_verticalMapping: 0
1022+
m_uvLineOffset: 0
1023+
m_geometrySortingOrder: 0
1024+
m_IsTextObjectScaleStatic: 0
1025+
m_VertexBufferAutoSizeReduction: 0
1026+
m_useMaxVisibleDescender: 1
1027+
m_pageToDisplay: 1
1028+
m_margin: {x: 0, y: 0, z: 0, w: 0}
1029+
m_isUsingLegacyAnimationComponent: 0
1030+
m_isVolumetricText: 0
1031+
m_hasFontAssetChanged: 0
1032+
m_baseMaterial: {fileID: 0}
1033+
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
1034+
--- !u!222 &983268470
1035+
CanvasRenderer:
1036+
m_ObjectHideFlags: 0
1037+
m_CorrespondingSourceObject: {fileID: 0}
1038+
m_PrefabInstance: {fileID: 0}
1039+
m_PrefabAsset: {fileID: 0}
1040+
m_GameObject: {fileID: 983268467}
1041+
m_CullTransparentMesh: 1
1042+
--- !u!114 &983268471
1043+
MonoBehaviour:
1044+
m_ObjectHideFlags: 0
1045+
m_CorrespondingSourceObject: {fileID: 0}
1046+
m_PrefabInstance: {fileID: 0}
1047+
m_PrefabAsset: {fileID: 0}
1048+
m_GameObject: {fileID: 983268467}
1049+
m_Enabled: 1
1050+
m_EditorHideFlags: 0
1051+
m_Script: {fileID: 11500000, guid: 1f1628237135ec74190a7c91697c88b0, type: 3}
1052+
m_Name:
1053+
m_EditorClassIdentifier:
1054+
gameTips:
1055+
- ' Tip: Use WASD or Arrow keys to move the player.'
1056+
- ' Tip: Use dash (J key) to escape tight spots!'
1057+
- ' Tip: Watch out for enemies that follow you!'
1058+
- ' Tip: Collect power-ups for a speed boost or invincibility.'
1059+
- ' Tip: Avoiding the boundary walls is key to survival!'
1060+
- ' Tip: The game will pause for a brief countdown before starting.'
9111061
--- !u!1 &1140263439
9121062
GameObject:
9131063
m_ObjectHideFlags: 0
@@ -1972,6 +2122,7 @@ RectTransform:
19722122
- {fileID: 267264360}
19732123
- {fileID: 1655126091}
19742124
- {fileID: 1972332942}
2125+
- {fileID: 983268468}
19752126
m_Father: {fileID: 0}
19762127
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
19772128
m_AnchorMin: {x: 0, y: 0}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using UnityEngine;
2+
using TMPro;
3+
using System.Collections;
4+
5+
[RequireComponent(typeof(TextMeshProUGUI))]
6+
public class TipDisplayManager : MonoBehaviour
7+
{
8+
[Header("Game Tips")]
9+
[Tooltip("Enter one tip per element in the list. The script will pick one randomly.")]
10+
public string[] gameTips = new string[]
11+
{
12+
" Tip: Use WASD or Arrow keys to move the player.",
13+
" Tip: Use dash (J key) to escape tight spots!",
14+
" Tip: Watch out for enemies that follow you!",
15+
" Tip: Collect power-ups for a speed boost or invincibility.",
16+
" Tip: Avoiding the boundary walls is key to survival!",
17+
" Tip: The game will pause for a brief countdown before starting."
18+
};
19+
20+
private TextMeshProUGUI tipText;
21+
22+
void Start()
23+
{
24+
tipText = GetComponent<TextMeshProUGUI>();
25+
26+
if (gameTips.Length == 0)
27+
{
28+
tipText.text = "No tips available.";
29+
return;
30+
}
31+
32+
int randomIndex = Random.Range(0, gameTips.Length);
33+
tipText.text = gameTips[randomIndex];
34+
}
35+
}

Assets/Scripts/TipDisplayManager.cs.meta

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

Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Material:
6262
- _WeightNormal: 0
6363
m_Colors:
6464
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767}
65-
- _FaceColor: {r: 1, g: 0.8957363, b: 0.34509802, a: 1}
65+
- _FaceColor: {r: 0.07169801, g: 0.07093251, b: 0.06696323, a: 1}
6666
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1}
6767
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
6868
m_BuildTextureStacks: []
@@ -8058,7 +8058,7 @@ Texture2D:
80588058
serializedVersion: 2
80598059
Hash: 00000000000000000000000000000000
80608060
m_IsAlphaChannelOptional: 0
8061-
serializedVersion: 4
8061+
serializedVersion: 3
80628062
m_Width: 1024
80638063
m_Height: 1024
80648064
m_CompleteImageSize: 1048576

Packages/packages-lock.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
"depth": 1,
1919
"source": "registry",
2020
"dependencies": {
21+
"com.unity.burst": "1.8.4",
2122
"com.unity.2d.sprite": "1.0.0",
2223
"com.unity.mathematics": "1.1.0",
23-
"com.unity.modules.uielements": "1.0.0",
2424
"com.unity.modules.animation": "1.0.0",
25-
"com.unity.burst": "1.8.4"
25+
"com.unity.modules.uielements": "1.0.0"
2626
},
2727
"url": "https://packages.unity.com"
2828
},
@@ -81,7 +81,7 @@
8181
},
8282
"com.unity.collections": {
8383
"version": "2.5.1",
84-
"depth": 2,
84+
"depth": 1,
8585
"source": "registry",
8686
"dependencies": {
8787
"com.unity.burst": "1.8.17",
@@ -141,7 +141,7 @@
141141
},
142142
"com.unity.nuget.mono-cecil": {
143143
"version": "1.11.4",
144-
"depth": 3,
144+
"depth": 2,
145145
"source": "registry",
146146
"dependencies": {},
147147
"url": "https://packages.unity.com"
@@ -235,7 +235,7 @@
235235
},
236236
"com.unity.test-framework.performance": {
237237
"version": "3.1.0",
238-
"depth": 3,
238+
"depth": 2,
239239
"source": "registry",
240240
"dependencies": {
241241
"com.unity.test-framework": "1.1.33",

0 commit comments

Comments
 (0)