Skip to content
Snippets Groups Projects
Commit 99da7288 authored by Robin Ruud Kristensen's avatar Robin Ruud Kristensen
Browse files

added key input to go to next level

parent cafdf5dd
No related branches found
No related tags found
1 merge request!79Ruud1
...@@ -24,6 +24,7 @@ namespace Bigsock ...@@ -24,6 +24,7 @@ namespace Bigsock
GameObject[] boss; GameObject[] boss;
GameObject player; GameObject player;
GameObject door; GameObject door;
GameObject stairs;
void Start() void Start()
{ {
...@@ -34,13 +35,13 @@ namespace Bigsock ...@@ -34,13 +35,13 @@ namespace Bigsock
void LateUpdate() void LateUpdate()
{ {
boss = GameObject.FindGameObjectsWithTag("Boss"); boss = GameObject.FindGameObjectsWithTag("Boss");
stairs = GameObject.Find("stairs(clone)");
if (boss.Length == 0 && levels <= 1) if (boss.Length == 0 && levels <= 1 && Input.GetKey(KeyCode.Return))
{ {
neighborMapGenerator.RunProceduralGeneration(); neighborMapGenerator.RunProceduralGeneration();
player.transform.position = new Vector3(9, 5, 0); player.transform.position = new Vector3(9, 5, 0);
levels++; levels++;
} }
int i = 0; int i = 0;
if(i == 0) { if(i == 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment