Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/bedder/Telethreat
Browse files Browse the repository at this point in the history
Conflicts:
	Assets/Prefab/Weapons/LightAlient_Bullet.prefab
  • Loading branch information
tbigfish committed Nov 28, 2014
2 parents 92c7a7e + 8815f7e commit 23db118
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion Assets/Scripts/LevelGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void Awake ()
{
gameController = GameObject.FindObjectOfType<GameController>();
prefab_player = (GameObject)gameController.playerController;
gameController.nextLevel = (gameController.nextLevel + 1) % Application.levelCount; // Make sure we load the next level upon completion

//Initialize objects
Vector2[] startGoalCells;
Expand Down
4 changes: 3 additions & 1 deletion Assets/Scripts/PlayerGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ void Start() {
gameController = GameObject.FindObjectOfType<GameController>();
gun = player.gun;

gameController.nextLevel++;
displayLevelNumberUntil = Time.time + displayLevelNumberFor;

barStyle = new GUIStyle();
Expand Down Expand Up @@ -200,10 +201,11 @@ void updateValues() {
healthbarActual.width = 0;
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")) {
gameController.nextLevel--;
gameController.nextLevel = Application.loadedLevel;
Application.LoadLevel(gameController.nextLevel);
}
if (Input.GetButton("Exit")) {
gameController.nextLevel = 1;
Application.LoadLevel(0);
}
}
Expand Down

0 comments on commit 23db118

Please sign in to comment.