Added UI for info on how to return to the main menu
This commit is contained in:
@@ -907,6 +907,7 @@ RectTransform:
|
|||||||
- {fileID: 586567537}
|
- {fileID: 586567537}
|
||||||
- {fileID: 676626517}
|
- {fileID: 676626517}
|
||||||
- {fileID: 386128843}
|
- {fileID: 386128843}
|
||||||
|
- {fileID: 1622739692}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 10
|
m_RootOrder: 10
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
@@ -1177,6 +1178,84 @@ MonoBehaviour:
|
|||||||
obstacle: {fileID: 6511841225854600656, guid: 839e7f2e94b70514dbc986f93edcae38,
|
obstacle: {fileID: 6511841225854600656, guid: 839e7f2e94b70514dbc986f93edcae38,
|
||||||
type: 3}
|
type: 3}
|
||||||
enemy: {fileID: 3604935524688938200, guid: 018764c970fb1a94ebd1652dc39c39e2, type: 3}
|
enemy: {fileID: 3604935524688938200, guid: 018764c970fb1a94ebd1652dc39c39e2, type: 3}
|
||||||
|
--- !u!1 &1622739691
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1622739692}
|
||||||
|
- component: {fileID: 1622739694}
|
||||||
|
- component: {fileID: 1622739693}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Escape Prompt
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1622739692
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1622739691}
|
||||||
|
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_Children: []
|
||||||
|
m_Father: {fileID: 1247606682}
|
||||||
|
m_RootOrder: 6
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: -400}
|
||||||
|
m_SizeDelta: {x: 350, y: 100}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1622739693
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1622739691}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 36
|
||||||
|
m_FontStyle: 1
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 1
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text:
|
||||||
|
--- !u!222 &1622739694
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1622739691}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
--- !u!1 &1712350085
|
--- !u!1 &1712350085
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public class GMScript : MonoBehaviour
|
|||||||
private Text newHighScore;
|
private Text newHighScore;
|
||||||
private Text restartPrompt;
|
private Text restartPrompt;
|
||||||
private Text highScore;
|
private Text highScore;
|
||||||
|
private Text escapePrompt;
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
@@ -36,6 +37,7 @@ public class GMScript : MonoBehaviour
|
|||||||
newHighScore = GameObject.Find("New High Score?").GetComponent<Text>();
|
newHighScore = GameObject.Find("New High Score?").GetComponent<Text>();
|
||||||
restartPrompt = GameObject.Find("Restart Prompt").GetComponent<Text>();
|
restartPrompt = GameObject.Find("Restart Prompt").GetComponent<Text>();
|
||||||
highScore = GameObject.Find("High Score").GetComponent<Text>();
|
highScore = GameObject.Find("High Score").GetComponent<Text>();
|
||||||
|
escapePrompt = GameObject.Find("Escape Prompt").GetComponent<Text>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,6 +64,7 @@ public class GMScript : MonoBehaviour
|
|||||||
timer.text = "Time: " + gameOverTime.ToString("F1");
|
timer.text = "Time: " + gameOverTime.ToString("F1");
|
||||||
gameOver.text = "Game Over!";
|
gameOver.text = "Game Over!";
|
||||||
restartPrompt.text = "Press 'R' to \n try again!";
|
restartPrompt.text = "Press 'R' to \n try again!";
|
||||||
|
escapePrompt.text = "Hit 'esc' to return to the main menu";
|
||||||
|
|
||||||
if(PlayerPrefs.GetInt("Score") > PlayerPrefs.GetInt("HighScore")
|
if(PlayerPrefs.GetInt("Score") > PlayerPrefs.GetInt("HighScore")
|
||||||
|| (PlayerPrefs.GetInt("Score") == PlayerPrefs.GetInt("HighScore")
|
|| (PlayerPrefs.GetInt("Score") == PlayerPrefs.GetInt("HighScore")
|
||||||
|
|||||||
@@ -4,5 +4,8 @@
|
|||||||
EditorBuildSettings:
|
EditorBuildSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Scenes: []
|
m_Scenes:
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/Scene.unity
|
||||||
|
guid: 2cda990e2423bbf4892e6590ba056729
|
||||||
m_configObjects: {}
|
m_configObjects: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user