Commit 5cfbb1e2 authored by 황호기's avatar 황호기

사소한 기능 추가

parent 0aaf1880
......@@ -12,7 +12,7 @@ public class Game : MonoBehaviour
{
get
{
if (instance == null)
if (instance == null && SceneManager.GetActiveScene().name != "MainScene")
instance = FindObjectOfType<Game>();
return instance;
}
......@@ -379,6 +379,12 @@ public class Game : MonoBehaviour
else if (player2.Mover.Energy[0] >= player2.Mover.MaxEnergy[0])
GameEnd(2);
}
if (Input.GetKeyDown(KeyCode.Escape))
{
GameData.MainUIIndex = 1;
SceneManager.LoadScene("MainScene");
}
}
public void ClearEnemy()
......
m_EditorVersion: 5.5.1f1
m_EditorVersion: 2017.3.1f1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment