Skip to content

Commit

Permalink
Fixed level numbers
Browse files Browse the repository at this point in the history
Increase alien bullet prefab size
  • Loading branch information
bedder committed Nov 28, 2014
1 parent c00583b commit 7d3efbe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Assets/Prefab/Weapons/LightAlient_Bullet.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Transform:
m_GameObject: {fileID: 100000}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: .200000003, y: .200000003, z: .200000003}
m_LocalScale: {x: .400000006, y: .400000006, z: .400000006}
m_Children:
- {fileID: 400002}
m_Father: {fileID: 0}
Expand Down
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 7d3efbe

Please sign in to comment.