Skip to content

Commit

Permalink
Added option to go to main menu after death
Browse files Browse the repository at this point in the history
  • Loading branch information
bedder committed Nov 28, 2014
1 parent a16d526 commit 5e48dc0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/Scripts/PlayerGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ void updateValues() {
} else {
armourbarActual.width = 0;
healthbarActual.width = 0;
drawText(new Rect(0, 0, Screen.width, Screen.height), "You died.\nPress R to restart", deathMessageStyle, 4);
drawText(new Rect(0, 0, Screen.width, Screen.height), "You died.\nPress R to restart\nor Escape to exit", deathMessageStyle, 4);
if (Input.GetButton("Restart")) {
Application.LoadLevel(Application.loadedLevel);
}
if (Input.GetButton("Exit")) {
Application.LoadLevel(0);
}
}

if (gun != null) {
Expand Down
16 changes: 16 additions & 0 deletions ProjectSettings/InputManager.asset
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,22 @@ InputManager:
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: Exit
descriptiveName:
descriptiveNegativeName:
negativeButton:
positiveButton: escape
altNegativeButton:
altPositiveButton:
gravity: 3
dead: .00100000005
sensitivity: 3
snap: 1
invert: 0
type: 0
axis: 0
joyNum: 0
- serializedVersion: 3
m_Name: DEBUGDAMAGE
descriptiveName:
Expand Down

0 comments on commit 5e48dc0

Please sign in to comment.