Ejemplo n.º 1
0
 void DebugTools()
 {
     if (Input.GetKeyDown(KeyCode.Backspace))
     {
         Application.LoadLevel("MainMenu");
     }
     if (Input.GetKeyDown(KeyCode.K))
     {
         dead();
     }
     if (Input.GetKeyDown(KeyCode.KeypadPlus))
     {
         Application.LoadLevel(Application.loadedLevel + 1);
     }
     if (Input.GetKeyDown(KeyCode.KeypadMinus))
     {
         Application.LoadLevel(Application.loadedLevel - 1);
     }
     if (Input.GetKeyDown(KeyCode.Keypad8))
     {
         livesControllerScript.addLives();
     }
     if (Input.GetKeyDown(KeyCode.Keypad2))
     {
         livesControllerScript.subtractLives();
     }
 }
Ejemplo n.º 2
0
 void dead()
 {
     if (soundController != null)
     {
         soundControllerScript.playSFX("DeadSound");
     }
     body.isKinematic = true;
     if (livesController != null)
     {
         livesControllerScript.addLives();
     }
     transform.position = new Vector2(checkPointPosition.x, checkPointPosition.y);
     greenAreaControllerScript.resetGreenArea();        //Reset Green Area
     resetAllKeys();
     body.isKinematic = false;
 }