Add key to allow quitting from the main game.
This commit is contained in:
parent
6998a09f19
commit
f615313098
2 changed files with 22 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
public class tetrominoUserControl : MonoBehaviour
|
public class tetrominoUserControl : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
@ -53,6 +54,11 @@ public class tetrominoUserControl : MonoBehaviour
|
||||||
activeTetromino.gameObject.transform.Rotate(0,0,-90,Space.World);
|
activeTetromino.gameObject.transform.Rotate(0,0,-90,Space.World);
|
||||||
GetComponent<AudioSource>().Play();
|
GetComponent<AudioSource>().Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Input.GetButtonDown("Quit"))
|
||||||
|
{
|
||||||
|
SceneManager.LoadScene("titleScreen");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActiveTetromino(GameObject tetromino)
|
public void setActiveTetromino(GameObject tetromino)
|
||||||
|
|
|
@ -165,3 +165,19 @@ InputManager:
|
||||||
type: 0
|
type: 0
|
||||||
axis: 0
|
axis: 0
|
||||||
joyNum: 0
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Quit
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: escape
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
|
Loading…
Reference in a new issue